Panos
Panos

Reputation: 11

Hibernate Search, Infinispan, jgroups, Wildfly cluster integration configuration

I am trying to config a jgroups, infinispan, hibernate search cluster on wildfly. I have two seperated archives in Netbeans, one war and one ejb jar. So I put the ejb as a dependency in the war and then push only the war into wildfly 10.0.0. The thing is that the jndi way did not work so luckily I saw this question. 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. I tried to put the xml configuration file in src, WEB-INF, META-INF, but I 'm stuck at the same exception.

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.

This is how I declare the property in the 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]
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.StandardServiceManager.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]
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 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

Any new ideas?

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

Upvotes: 0

Views: 355

Answers (1)

Sanne
Sanne

Reputation: 6107

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.

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).

The easiest is to use the Hibernate Search version included in WildFly, as described in the Hibernate Search documentation.

For WildFly 10 that's Hibernate Search version 5.5.1 as you can see in the tagged sources.

Next get the Infinispan release which is aiming at compatibility with this specific version of the app server; you need the "WildFly/EAP modules" from the Infinispan downloads.

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.

Upvotes: 2

Related Questions