Infinispan - Hibernate 2nd Level Cache Cluster Marshaling issue

318 Views Asked by At

We are trying to configure infinispan as the 2nd level cache for Hibernate in Jboss EAP 7.1 and run the jboss in clustered two node setup.

Lookup for cache elements works, but if we update hibernate entities, then update cache step triggered by infinispan fails on both nodes with marshaling error ( caused by class not found exception ) of that entity we are trying to update.

Here is the configuration :

In hibernate-cfg.xml org.hibernate.cache.infinispan.InfinispanRegionFactory

in sample-entity-hbm.xml

 <class name="com.business.standard.StandardCode" table="csc011">

 <cache usage="read-write"/>   

in jboss standalone-ha.xml

        <cache-container name="hibernate"  module="org.hibernate.infinispan">
            <transport channel="hibernate-channel" lock-timeout="60000"/>
            <local-cache name="local-query">
                <eviction strategy="LRU" max-entries="10000"/>
                <expiration max-idle="100000"/>
            </local-cache>
            <replicated-cache name="timestamps" mode="ASYNC"/>
            <invalidation-cache name="entity">
                <transaction mode="NON_XA"/>
                <eviction strategy="LRU" max-entries="10000"/>
                <expiration max-idle="100000"/>
            </invalidation-cache>               
        </cache-container>

Error :

15:02:45,974 WARN [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (OOB-20,XXX-53994) ISPN000220: Problems un-marshalling remote command from byte buffer: java.lang.ClassNotFoundException: com.business.standard.StandardCode from [Module "org.hibernate.infinispan" from local module loader @64d2d351 (finder: local module finder @1b68b9a4 (roots: C:\jboss-eap-7.1\NodeA\modules,C:\jboss-eap-7.1\NodeA\modules\system\layers\base.overlays\layer-base-jboss-eap-7.1.5.CP,C:\jboss-eap-7.1\NodeA\modules\system\layers\base,C:\jboss-eap-7.1\DEV\modules))] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:123) at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:104) at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:1022) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1355) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:220) at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1853) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1767) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1395) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205) at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41) at org.infinispan.commons.marshall.MarshallUtil.unmarshallArray(MarshallUtil.java:159) at org.infinispan.commands.write.InvalidateCommand.readFrom(InvalidateCommand.java:109) at org.hibernate.cache.infinispan.util.BeginInvalidationCommand.readFrom(BeginInvalidationCommand.java:47) at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readCommandParameters(ReplicableCommandExternalizer.java:113) at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readObject(ReplicableCommandExternalizer.java:89) at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readObject(ReplicableCommandExternalizer.java:41) at org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:479) at org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:236) at org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:149) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:350) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205) at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41) at org.infinispan.commands.remote.SingleRpcCommand.readFrom(SingleRpcCommand.java:46) at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readCommandParameters(ReplicableCommandExternalizer.java:113) at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:173) at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:68) at org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:479) at org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:236) at org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:149) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:350) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205) at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41) at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:134) at org.infinispan.marshall.core.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:101) at org.infinispan.commons.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:80) at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(MarshallerAdapter.java:28) at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:163) at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:455) at org.jgroups.blocks.RequestCorrelator.dispatch(RequestCorrelator.java:406) at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:357) at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:245) at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:664) at org.jgroups.JChannel.up(JChannel.java:738) at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1030) at org.jgroups.protocols.FRAG2.up(FRAG2.java:165) at org.jgroups.protocols.FlowControl.up(FlowControl.java:390) at org.jgroups.protocols.pbcast.GMS.up(GMS.java:1037) at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234) at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1077) at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:792) at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:433) at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:649) at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:155) at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:200) at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:325) at org.jgroups.protocols.MERGE3.up(MERGE3.java:292) at org.jgroups.protocols.Discovery.up(Discovery.java:296) at org.jgroups.protocols.MPING.up(MPING.java:178) at org.jgroups.protocols.TP.passMessageUp(TP.java:1658) at org.jgroups.protocols.TP$SingleMessageHandler.run(TP.java:1876)

Thanks Santhosh S

0

There are 0 best solutions below