Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-637

MarshalledValue.equals(...) causing ClassNotFoundException during remote invalidation handling

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.ALPHA2, 4.2.0.Final
    • 4.0.0.Final, 4.1.0.Final, 4.2.0.ALPHA1
    • Marshalling
    • None

      Using lazy deserialization with application specific cache keys, remote handling of a cache invalidation operation triggers MarshalledValue.equals(...) on the cache key, triggering deserialization and causes a ClassNotFoundException in my environment, due to the class not being found in the context classloader of the jgroups receiver thread.

      The user of the cache in this case is the 2nd level cache of an entity manager via the hibernate-infinispan cache provider. While the cache is specific to the application, the cache manager is not, and is managed via the AS, which probably accounts for the classloader issue.

      2010-09-09 14:43:31,481 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (OOB-19,null) Execution error: : org.infinispan.CacheException: Unable to unmarshall value
      at org.infinispan.marshall.MarshalledValue.deserialize(MarshalledValue.java:114) [:4.1.0.FINAL]
      at org.infinispan.marshall.MarshalledValue.equals(MarshalledValue.java:184) [:4.1.0.FINAL]
      at java.util.concurrent.ConcurrentHashMap$Segment.get(ConcurrentHashMap.java:366) [:1.6.0_20]
      at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:797) [:1.6.0_20]
      at org.infinispan.container.DefaultDataContainer.peek(DefaultDataContainer.java:105) [:4.1.0.FINAL]
      at org.infinispan.container.DefaultDataContainer.get(DefaultDataContainer.java:110) [:4.1.0.FINAL]
      at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:156) [:4.1.0.FINAL]
      at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:106) [:4.1.0.FINAL]
      at org.infinispan.interceptors.LockingInterceptor.visitInvalidateCommand(LockingInterceptor.java:186) [:4.1.0.FINAL]
      at org.infinispan.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:119) [:4.1.0.FINAL]
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [:4.1.0.FINAL]
      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132) [:4.1.0.FINAL]
      at org.infinispan.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:117) [:4.1.0.FINAL]
      at org.infinispan.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:119) [:4.1.0.FINAL]
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [:4.1.0.FINAL]
      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132) [:4.1.0.FINAL]
      at org.infinispan.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:117) [:4.1.0.FINAL]
      at org.infinispan.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:119) [:4.1.0.FINAL]
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [:4.1.0.FINAL]
      at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:183) [:4.1.0.FINAL]
      at org.infinispan.interceptors.TxInterceptor.visitInvalidateCommand(TxInterceptor.java:157) [:4.1.0.FINAL]
      at org.infinispan.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:119) [:4.1.0.FINAL]
      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [:4.1.0.FINAL]
      at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:57) [:4.1.0.FINAL]
      at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:38) [:4.1.0.FINAL]
      at org.infinispan.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:117) [:4.1.0.FINAL]
      at org.infinispan.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:119) [:4.1.0.FINAL]
      at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:273) [:4.1.0.FINAL]
      at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:42) [:4.1.0.FINAL]
      at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:44) [:4.1.0.FINAL]
      at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:76) [:4.1.0.FINAL]
      at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:176) [:4.1.0.FINAL]
      at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:148) [:4.1.0.FINAL]
      at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:575) [:2.10.0.GA]
      at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:486) [:2.10.0.GA]
      at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:362) [:2.10.0.GA]
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:771) [:2.10.0.GA]
      at org.jgroups.blocks.mux.MuxUpHandler.up(MuxUpHandler.java:136) [:2.10.0.GA]
      at org.jgroups.JChannel.up(JChannel.java:1453) [:2.10.0.GA]
      at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:887) [:2.10.0.GA]
      at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:483) [:2.10.0.GA]
      at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:265) [:2.10.0.GA]
      at org.jgroups.protocols.FRAG2.up(FRAG2.java:188) [:2.10.0.GA]
      at org.jgroups.protocols.FC.up(FC.java:494) [:2.10.0.GA]
      at org.jgroups.protocols.pbcast.GMS.up(GMS.java:888) [:2.10.0.GA]
      at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:171) [:2.10.0.GA]
      at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234) [:2.10.0.GA]
      at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [:2.10.0.GA]
      at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:813) [:2.10.0.GA]
      at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:671) [:2.10.0.GA]
      at org.jgroups.protocols.BARRIER.up(BARRIER.java:120) [:2.10.0.GA]
      at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:132) [:2.10.0.GA]
      at org.jgroups.protocols.FD.up(FD.java:266) [:2.10.0.GA]
      at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:270) [:2.10.0.GA]
      at org.jgroups.protocols.MERGE2.up(MERGE2.java:210) [:2.10.0.GA]
      at org.jgroups.protocols.Discovery.up(Discovery.java:281) [:2.10.0.GA]
      at org.jgroups.protocols.PING.up(PING.java:67) [:2.10.0.GA]
      at org.jgroups.stack.Protocol.up(Protocol.java:371) [:2.10.0.GA]
      at org.jgroups.protocols.TP.passMessageUp(TP.java:1009) [:2.10.0.GA]
      at org.jgroups.protocols.TP.access$100(TP.java:56) [:2.10.0.GA]
      at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1549) [:2.10.0.GA]
      at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1531) [:2.10.0.GA]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.6.0_20]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.6.0_20]
      at java.lang.Thread.run(Thread.java:636) [:1.6.0_20]
      Caused by: java.lang.ClassNotFoundException: org.jboss.test.cluster.clusteredentity.embeddedid.MusicianPK from BaseClassLoader@4dd761d0

      {vfs:///home/paul/jboss/as/infinispan-int/build/target/jboss-6.0.0-SNAPSHOT/server/cluster-udp-1/conf/jboss-service.xml}

      at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.0.Alpha7]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:266) [:1.6.0_20]
      at java.lang.Class.forName0(Native Method) [:1.6.0_20]
      at java.lang.Class.forName(Class.java:264) [:1.6.0_20]
      at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135) [:]
      at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116) [:]
      at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:845) [:]
      at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1144) [:]
      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) [:]
      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209) [:]
      at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1610) [:]
      at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1526) [:]
      at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1175) [:]
      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) [:]
      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209) [:]
      at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:36) [:]
      at org.infinispan.marshall.jboss.GenericJBossMarshaller.objectFromObjectStream(GenericJBossMarshaller.java:162) [:4.1.0.FINAL]
      at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:111) [:4.1.0.FINAL]
      at org.infinispan.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:49) [:4.1.0.FINAL]
      at org.infinispan.marshall.MarshalledValue.deserialize(MarshalledValue.java:111) [:4.1.0.FINAL]
      ... 64 more

              rh-ee-galder Galder Zamarreño
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: