1 Reply Latest reply: Mar 6, 2012 5:37 AM by Sanne Grinovero RSS

    Infinispan marshalling

    Andre Locher Newbie

      Hello

       

      I am trying to use Infinispan in a multi machine setup with UDP as the sharing protocol. As soon as a second node joins Infinispan is trying to publish changes between the nodes by marshalling objects. This is the point where I get the following error.

      My Cache objects (Key and Value) are both java objects using an Externalizer.

       

      Thanks

       

       

      2012-03-05 16:33:16,649 - - InvocationContextInterceptor.handleAll(141) | ISPN000136: Execution error

      org.infinispan.CacheException: java.lang.RuntimeException: Failure to marshal argument(s)

                at org.infinispan.util.Util.rewrapAsCacheException(Util.java:524)

                at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:115)

                at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:447)

                at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:148)

                at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:169)

                at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:219)

                at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:206)

                at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:201)

                at org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:184)

                at org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:177)

                at org.infinispan.interceptors.ReplicationInterceptor.handleCrudMethod(ReplicationInterceptor.java:188)

                at org.infinispan.interceptors.ReplicationInterceptor.visitPutKeyValueCommand(ReplicationInterceptor.java:149)

                at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

                at org.infinispan.interceptors.EntryWrappingInterceptor.invokeNextAndApplyChanges(EntryWrappingInterceptor.java:199)

                at org.infinispan.interceptors.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:134)

                at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

                at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitPutKeyValueCommand(NonTransactionalLockingInterceptor.java:68)

                at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

                at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)

                at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:61)

                at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

                at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:207)

                at org.infinispan.interceptors.StateTransferLockInterceptor.handleWriteCommand(StateTransferLockInterceptor.java:180)

                at org.infinispan.interceptors.StateTransferLockInterceptor.visitPutKeyValueCommand(StateTransferLockInterceptor.java:151)

                at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

                at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:130)

                at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:89)

                at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:61)

                at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

                at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)

                at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:941)

                at org.infinispan.CacheImpl.put(CacheImpl.java:654)

                at org.infinispan.CacheImpl.put(CacheImpl.java:646)

                at org.infinispan.CacheSupport.put(CacheSupport.java:52)

                at MyClass.tJMSTransactionalInput_2Process(MyClass.java:20206)

                at MyClass.tMysqlInput_8Process(MyClass.java:2516)

                at MyClass.tMysqlInput_6Process(MyClass.java:2173)

                at MyClass.tMysqlConnection_1Process(MyClass.java:1746)

                at MyClass.tLibraryLoad_1Process(MyClass.java:1617)

                at MyClass.runJobInTOS(MyClass.java:35819)

                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.RuntimeException: Failure to marshal argument(s)

                at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher$ReplicationTask.marshallCall(CommandAwareRpcDispatcher.java:216)

                at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:235)

                at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:111)

                ... 54 more

      Caused by: java.lang.IllegalArgumentException: Cannot instantiate externalizer for class MyClass$1SCDSK_tMySQLSCDCached_1

                at org.infinispan.marshall.jboss.SerializeWithExtFactory.getExternalizer(SerializeWithExtFactory.java:54)

                at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:844)

                at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

                at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:119)

                at org.infinispan.marshall.exts.ReplicableCommandExternalizer.writeCommandParameters(ReplicableCommandExternalizer.java:84)

                at org.infinispan.marshall.exts.ReplicableCommandExternalizer.writeObject(ReplicableCommandExternalizer.java:69)

                at org.infinispan.marshall.exts.ReplicableCommandExternalizer.writeObject(ReplicableCommandExternalizer.java:57)

                at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.writeObject(ExternalizerTable.java:404)

                at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:145)

                at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

                at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:119)

                at org.infinispan.marshall.exts.ReplicableCommandExternalizer.writeCommandParameters(ReplicableCommandExternalizer.java:84)

                at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.marshallParameters(CacheRpcCommandExternalizer.java:126)

                at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.writeObject(CacheRpcCommandExternalizer.java:113)

                at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.writeObject(CacheRpcCommandExternalizer.java:68)

                at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.writeObject(ExternalizerTable.java:404)

                at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:145)

                at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

                at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:119)

                at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectToObjectStream(AbstractJBossMarshaller.java:86)

                at org.infinispan.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:86)

                at org.infinispan.marshall.AbstractMarshaller.objectToBuffer(AbstractMarshaller.java:57)

                at org.infinispan.marshall.AbstractDelegatingMarshaller.objectToBuffer(AbstractDelegatingMarshaller.java:89)

                at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectToBuffer(MarshallerAdapter.java:45)

                at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher$ReplicationTask.marshallCall(CommandAwareRpcDispatcher.java:214)

                ... 56 more

      Caused by: java.lang.InstantiationException: MyClass$1SCDSK_tMySQLSCDCached_1$SCDSKExternalizer_tMySQLSCDCached_1

                at java.lang.Class.newInstance0(Class.java:340)

                at java.lang.Class.newInstance(Class.java:308)

                at org.infinispan.marshall.jboss.SerializeWithExtFactory.getExternalizer(SerializeWithExtFactory.java:52)

                ... 80 more

      Caused by: an exception which occurred:

                in object MyClass$1SCDSK_tMySQLSCDCached_1@8b

                          -> toString = MyClass$1SCDSK_tMySQLSCDCached_1@8b

                in object org.infinispan.commands.write.PutKeyValueCommand@6e30f9ad

                          -> toString = PutKeyValueCommand{key=MyClass$1SCDSK_tMySQLSCDCached_1@8b, value=MyClass$1SCDStruct_tMySQLSCDCached_1@53781c9e, flags=null, putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1}

                in object org.infinispan.commands.remote.SingleRpcCommand@c478c7e9

                          -> toString = SingleRpcCommand{cacheName='customerCache', command=PutKeyValueCommand{key=MyClass$1SCDSK_tMySQLSCDCached_1@8b, value=MyClass$1SCDStruct_tMySQLSCDCached_1@53781c9e, flags=null, putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1