简体   繁体   English

Hibernate Search,Infinispan,jgroups,Wildfly集群集成配置

[英]Hibernate Search, Infinispan, jgroups, Wildfly cluster integration configuration

I am trying to config a jgroups, infinispan, hibernate search cluster on wildfly. 我正在尝试在Wildfly上配置jgroups,infinispan,休眠搜索集群。 I have two seperated archives in Netbeans, one war and one ejb jar. 我在Netbeans中有两个单独的档案,一个是战争,另一个是ejb jar。 So I put the ejb as a dependency in the war and then push only the war into wildfly 10.0.0. 因此,我将ejb作为战争的依赖项,然后仅将战争推入wildfly 10.0.0。 The thing is that the jndi way did not work so luckily I saw this question. 事情是,jndi方式无法正常运行,我很幸运地看到了这个问题。 Now I 'm trying to configure it with the xml configuration file, but I still always fall into a com.ctc.wstx.exc.WstxIOException: Stream closed . 现在,我尝试使用xml配置文件对其进行配置,但我仍然始终会陷入com.ctc.wstx.exc.WstxIOException:流已关闭 I tried to put the xml configuration file in src, WEB-INF, META-INF, but I 'm stuck at the same exception. 我试图将xml配置文件放在src,WEB-INF,META-INF中,但是我遇到了同样的异常。

I already check these( Configuring Infinispan CacheProvider in Seam 2.3 , "experimental" status of JGroups Master/Slave backend for hibernate search and infinispan , InfinispanDirectoryProvider with Wildfly 10.1 ) with no results. 我已经检查了这些( 在Seam 2.3中配置Infinispan CacheProvider, 用于休眠搜索的JGroups主/从后端的“实验”状态和用于infinispan的 Infinispan,具有Wildfly 10.1的InfinispanDirectoryProvider ),没有结果。

This is how I declare the property in the persistence.xml 这就是我在persistence.xml中声明属性的方式

property name="hibernate.search.infinispan.configuration_resourcename" value="infinispan-config.xml"

[Server:server-one] Caused by: org.infinispan.commons.CacheConfigurationException: com.ctc.wstx.exc.WstxIOException: Stream closed [Server:server-one] [Server:server-one]原因:org.infinispan.commons.CacheConfigurationException:com.ctc.wstx.exc.WstxIOException:流关闭[Server:server-one]
at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:110) [Server:server-one] at org.infinispan.hibernate.search.impl.InfinispanConfigurationParser.parseFile(InfinispanConfigurationParser.java:57) [Server:server-one] at org.infinispan.hibernate.search.impl.InfinispanConfigurationParser.parseFile(InfinispanConfigurationParser.java:42) [Server:server-one] at org.infinispan.hibernate.search.impl.DefaultCacheManagerService.start(DefaultCacheManagerService.java:79) [Server:server-one] at org.hibernate.search.engine.service.impl.StandardServiceManager$ServiceWrapper.startService(StandardServiceManager.java:303) [Server:server-one] at org.hibernate.search.engine.service.impl.StandardServiceManager$ServiceWrapper.startVirtual(StandardServiceManager.java:268) [Server:server-one] at org.hibernate.search.engine.service.impl.StandardServiceManager.createAndCacheWrapper(StandardServiceManager.java:205) [Server:server-one] at org.hibernate.search.engine.service.impl.Stand 在org.infinispan.hibernate.search.impl.InfinispanConfigurationParser.parseFile(InfinispanConfigurationParser.java:57)上的org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:110)[服务器:服务器一]服务器一]在org.infinispan.hibernate.search.impl.InfinispanConfigurationParser.parseFile(InfinispanConfigurationParser.java:42)[服务器:服务器一]在org.infinispan.hibernate.search.impl.DefaultCacheManagerService.start(DefaultCacheManagerService.java :79)org.hibernate.search.engine.service.impl.StandardServiceManager $ ServiceWrapper.startService(StandardServiceManager.java:303)上的[Server:server-one] org.hibernate.search.engine上的[Server:server-one] .service.impl.StandardServiceManager $ ServiceWrapper.startVirtual(StandardServiceManager.java:268)在org.hibernate.search.engine.service.impl.StandardServiceManager.createAndCacheWrapper(StandardServiceManager.java:205)上的[服务器:服务器一] [服务器:服务器一],位于org.hibernate.search.engine.service.impl.Stand ardServiceManager.requestService(StandardServiceManager.java:87) [Server:server-one] at org.infinispan.hibernate.search.spi.InfinispanDirectoryProvider.initialize(InfinispanDirectoryProvider.java:66) [Server:server-one] at org.hibernate.search.store.spi.BaseDirectoryProviderService.initialize(BaseDirectoryProviderService.java:64) [Server:server-one] ... 28 more [Server:server-one] Caused by: com.ctc.wstx.exc.WstxIOException: Stream closed [Server:server-one] ardServiceManager.requestService(StandardServiceManager.java:87)在org.infinispan.hibernate.search.spi.InfinispanDirectoryProvider.initialize(InfinispanDirectoryProvider.java:66)上的[服务器:服务器一]在org.hibernate上的[服务器:服务器一]。 search.store.spi.BaseDirectoryProviderService.initialize(BaseDirectoryProviderService.java:64)[Server:server-one] ...更多28 [Server:server-one]原因:com.ctc.wstx.exc.WstxIOException:流已关闭[服务器:服务器一]
at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:550) [Server:server-one] at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:605) [Server:server-one] at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:618) [Server:server-one] at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324) [Server:server-one] at __redirected.__XMLInputFactory.createXMLStreamReader(__XMLInputFactory.java:134) [Server:server-one] at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:116) [Server:server-one] at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:105) [Server:server-one] ... 37 more [Server:server-one] Caused by: java.io.IOException: Stream closed [Server:server-one] at java.io.BufferedInputStream.getInIfOpen(Unknown Source) [Server:server-one] at java.io.BufferedInputStream.fill(Unknown Source) [Server:server-one] at java.io.BufferedInputStream.read1(Unknown com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:550)上的[Server:server-one] com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:605)上的[Server:server-一] com.ctc.wstx.stax.WstxInputFactory.java(WstxInputFactory.java:618)[服务器:服务器一] com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)[服务器: __redirected .__ XMLInputFactory.createXMLStreamReader(__ XMLInputFactory.java:134)的服务器一] [服务器:服务器一] org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:116)的[服务器:服务器一]在org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:105)上[Server:server-one] ...更多37 [Server:server-one]原因:java.io.IOException:流关闭[服务器:服务器一]在java.io.BufferedInputStream.getInIfOpen(未知源)[服务器:服务器一]在java.io.BufferedInputStream.fill(未知源)[服务器:服务器一]在java.io.BufferedInputStream .read1(未知 Source) [Server:server-one] at java.io.BufferedInputStream.read(Unknown Source) [Server:server-one] at com.ctc.wstx.io.StreamBootstrapper.ensureLoaded(StreamBootstrapper.java:478) [Server:server-one] at com.ctc.wstx.io.StreamBootstrapper.resolveStreamEncoding(StreamBootstrapper.java:302) [Server:server-one] at com.ctc.wstx.io.StreamBootstrapper.bootstrapInput(StreamBootstrapper.java:166) [Server:server-one] at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:545) [Server:server-one] ... 43 more 源)位于java.io.BufferedInputStream.read上的[服务器:服务器一](未知源)com.ctc.wstx.io.StreamBootstrapper.ensureLoaded(StreamBootstrapper.java:478)上的[服务器:服务器一] [服务器:服务器一]在com.ctc.wstx.io.StreamBootstrapper.resolveStreamEncoding(StreamBootstrapper.java:302)[服务器:服务器一]在com.ctc.wstx.io.StreamBootstrapper.bootstrapInput(StreamBootstrapper.java:166)[服务器:服务器一]位于com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:545)[服务器:服务器一] ...另外43

Any new ideas? 有什么新主意吗?

Infinispan 8.2.4, Hibernate Search 5.6.4, Wildfly 10.0.0, Hibernate OGM 5.1.0 Infinispan 8.2.4,Hibernate搜索5.6.4,Wildfly 10.0.0,Hibernate OGM 5.1.0

Such errors are caused by having bundled an incompatible version; 此类错误是由于捆绑了不兼容的版本引起的; since you mention Hibernate Search 5.6.4 which is not the version included in WildFly 10 I guess you're bundling a copy of the library in your application. 由于您提到的是Hibernate Search 5.6.4这不是WildFly 10附带的版本),我想您是在应用程序中捆绑了该库的副本。

You could update the libraries but that requires expert assembly of a custom module; 您可以更新库,但需要专家组装定制模块。 it's best to take one of the existing modules sets as they will have been tested by the respective releasing team (Hibernate/WildFly/Infinispan). 最好采用现有的模块集之一,因为它们将由相应的发布团队(Hibernate / WildFly / Infinispan)进行测试。

The easiest is to use the Hibernate Search version included in WildFly, as described in the Hibernate Search documentation . 最简单的方法是使用WildFly中包含的Hibernate Search版本,如Hibernate Search文档中所述

For WildFly 10 that's Hibernate Search version 5.5.1 as you can see in the tagged sources . 对于WildFly 10,它是Hibernate Search版本5.5.1如您在标记的源中所见。

Next get the Infinispan release which is aiming at compatibility with this specific version of the app server; 接下来获得Infinispan版本,该版本旨在与该特定版本的应用服务器兼容。 you need the "WildFly/EAP modules" from the Infinispan downloads . 您需要Infinispan下载中的“ WildFly / EAP模块”。

Alternatively use the modules included by any Hibernate Search release as described in section 3.10.2 but these don't include Infinispan, you'll have to fetch a compatible version from Infinispan. 或者,如3.10.2节所述,使用任何Hibernate Search版本包含的模块,但这些模块不包含Infinispan,您必须从Infinispan获取兼容版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM