Hello I want to use JBoss Cache to store the result of different method calls (The objects are all serializable). The results and the method-data (method-name, class-name, parameters) are stored in a database.
I created some test classes with test methods which return different objects. The storage in the memory cache works fine. When I activate the jdbc config it writes the method data into the database. But when I try to write the result into the same node but under a different key. I get the following Exception: anonymous wrote : | org.jboss.cache.CacheException: java.lang.Exception: Unable to load to deserialize result: | at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:227) | at org.jboss.cache.invocation.CacheInvocationDelegate.getNode(CacheInvocationDelegate.java:420) | at org.jboss.cache.invocation.CacheInvocationDelegate.getNode(CacheInvocationDelegate.java:61) | at de.arvatomobile.bdev.cache.methodresultcacher.MethodResultCacheManager.executeMethod(MethodResultCacheManager.java:104) | at de.arvatomobile.bdev.cache.methodresultcacher.TestLock.main(TestLock.java:60) | Caused by: java.lang.Exception: Unable to load to deserialize result: | at org.jboss.cache.loader.AdjListJDBCCacheLoader.loadNode(AdjListJDBCCacheLoader.java:378) | at org.jboss.cache.loader.AdjListJDBCCacheLoader.exists(AdjListJDBCCacheLoader.java:292) | at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:296) | at org.jboss.cache.interceptors.CacheLoaderInterceptor.visitGetNodeCommand(CacheLoaderInterceptor.java:147) | at org.jboss.cache.commands.read.GetNodeCommand.acceptVisitor(GetNodeCommand.java:42) | at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142) | at org.jboss.cache.interceptors.PessimisticLockInterceptor.handleGetNodeCommand(PessimisticLockInterceptor.java:317) | at org.jboss.cache.interceptors.base.PostProcessingCommandInterceptor.visitGetNodeCommand(PostProcessingCommandInterceptor.java:257) | at org.jboss.cache.commands.read.GetNodeCommand.acceptVisitor(GetNodeCommand.java:42) | at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142) | at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:157) | at org.jboss.cache.commands.AbstractVisitor.visitGetNodeCommand(AbstractVisitor.java:94) | at org.jboss.cache.commands.read.GetNodeCommand.acceptVisitor(GetNodeCommand.java:42) | at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142) | at org.jboss.cache.interceptors.MarshalledValueInterceptor.visitGetNodeCommand(MarshalledValueInterceptor.java:93) | at org.jboss.cache.commands.read.GetNodeCommand.acceptVisitor(GetNodeCommand.java:42) | at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142) | at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:266) | at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:253) | at org.jboss.cache.commands.AbstractVisitor.visitGetNodeCommand(AbstractVisitor.java:94) | at org.jboss.cache.commands.read.GetNodeCommand.acceptVisitor(GetNodeCommand.java:42) | at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142) | at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:157) | at org.jboss.cache.commands.AbstractVisitor.visitGetNodeCommand(AbstractVisitor.java:94) | at org.jboss.cache.commands.read.GetNodeCommand.acceptVisitor(GetNodeCommand.java:42) | at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:142) | at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:155) | at org.jboss.cache.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:108) | at org.jboss.cache.commands.AbstractVisitor.visitGetNodeCommand(AbstractVisitor.java:94) | at org.jboss.cache.commands.read.GetNodeCommand.acceptVisitor(GetNodeCommand.java:42) | at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:215) | ... 4 more | Caused by: java.lang.ClassNotFoundException: int | at java.net.URLClassLoader$1.run(URLClassLoader.java:200) | at java.security.AccessController.doPrivileged(Native Method) | at java.net.URLClassLoader.findClass(URLClassLoader.java:188) | at java.lang.ClassLoader.loadClass(ClassLoader.java:306) | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) | at java.lang.ClassLoader.loadClass(ClassLoader.java:251) | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) | at java.lang.Class.forName0(Native Method) | at java.lang.Class.forName(Class.java:247) | at org.jboss.util.stream.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.java:60) | at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575) | at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496) | at java.io.ObjectInputStream.readClass(ObjectInputStream.java:1462) | at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1312) | at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667) | at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323) | at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) | at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869) | at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) | at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) | at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) | at org.jboss.cache.marshall.CacheMarshaller200.unmarshallObject(CacheMarshaller200.java:549) | at org.jboss.cache.marshall.CacheMarshaller200.populateFromStream(CacheMarshaller200.java:759) | at org.jboss.cache.marshall.CacheMarshaller200.unmarshallHashMap(CacheMarshaller200.java:722) | at org.jboss.cache.marshall.CacheMarshaller200.unmarshallObject(CacheMarshaller200.java:580) | at org.jboss.cache.marshall.CacheMarshaller200.unmarshallObject(CacheMarshaller200.java:512) | at org.jboss.cache.marshall.CacheMarshaller200.objectFromObjectStream(CacheMarshaller200.java:140) | at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:189) | at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromStream(VersionAwareMarshaller.java:223) | at org.jboss.cache.loader.AdjListJDBCCacheLoader.unmarshall(AdjListJDBCCacheLoader.java:681) | at org.jboss.cache.loader.AdjListJDBCCacheLoader.loadNode(AdjListJDBCCacheLoader.java:374) | ... 34 more | I found out that there is an old bug in suns ObjectInputStream. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4171142 Is there something I can configure to fix that? Or do I have to write my own Marshaller? Thanks Marco View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171608#4171608 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171608 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
