[jboss-user] [JBossCache] - JBossCache 2.0.0.RC3 unmarshallObject exception
tmp8914
do-not-reply at jboss.com
Fri Nov 9 04:57:30 EST 2007
Hello Experts,
I've got a bizzar replication Exception with JBossCache 2.0.0.RC3.
The code snippet:
1 import org.apache.log4j.Logger;
| 2 import java.io.*;
| 3 import java.util.*;
| 4 import org.jboss.cache.*;
| 5 import org.jboss.cache.config.*;
| 6 import org.jboss.*;
| 7
| 8 class Info implements Serializable
| 9 {
| 10 String s;
| 11 //byte[] data;
| 12 String[] i;
| 13
| 14 Info(String s)
| 15 {
| 16 this.s=s;
| 17 //data=new byte[10];
| 18 //data[0]=0x1;
| 19 i=new String[1];
| 20 i[0]=new String("0x2");
| 21 }
| 22 }
| 23
| 24 class jbc_store
| 25 {
| 26 protected Cache c0;
| 27 public jbc_store()
| 28 {
| 29 CacheFactory factory=DefaultCacheFactory.getInstance();
| 30 c0=factory.createCache("jbc.conf",false);
| 31 Configuration config = c0.getConfiguration();
| 32 config.setClusterName("cluster0");
| 33 c0.create();
| 34 c0.start();
| 35 }
| 36 public void put(long id,String s)
| 37 {
| 38 Node rn=c0.getRoot();
| 39 Fqn n_path=Fqn.fromString("/test");
| 40 Node n=rn.addChild(n_path);
| 41 rn.put("key",new Info(s));
| 42 }
| 43 }
The application is running on two nodes.
When I call jbc_store.put(0,"test") the second node which receives the replicated "Info" object catches an exception:
2007-11-09 12:40:53,504 ERROR InactiveRegionAwareRpcDispatcher : exception marshalling object
| java.lang.ClassNotFoundException: [Ljava.lang.String;
| 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 org.jboss.util.stream.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.java:58)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
| at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
| 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:537)
| at org.jboss.cache.marshall.CacheMarshaller200.unmarshallMethodCall(CacheMarshaller200.java:642)
| at org.jboss.cache.marshall.CacheMarshaller200.unmarshallObject(CacheMarshaller200.java:541)
| at org.jboss.cache.marshall.CacheMarshaller200.unmarshallMethodCall(CacheMarshaller200.java:642)
| at org.jboss.cache.marshall.CacheMarshaller200.unmarshallObject(CacheMarshaller200.java:541)
| at org.jboss.cache.marshall.CacheMarshaller200.objectFromObjectStream(CacheMarshaller200.java:147)
| at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:154)
| at org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher.handle(InactiveRegionAwareRpcDispatcher.java:50)
| at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:654)
| at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:544)
| at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:367)
| at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:777)
| at org.jgroups.JChannel.up(JChannel.java:1091)
| at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:382)
| at org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:398)
| at org.jgroups.stack.Protocol.passUp(Protocol.java:520)
| at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:158)
| at org.jgroups.stack.UpHandler.run(Protocol.java:60)
After some tests, I've noticed that only array couldn't be deserialized (regardless of the type of elements).
The application is compiled and run under Java6.
What could be the origin of this problem?
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103195#4103195
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103195
More information about the jboss-user
mailing list