byte array and Object Encoder , Object Decoder

manish_iitg excellencetechnologies08 at gmail.com
Thu Jun 18 09:49:58 EDT 2009


Hello,

I have noticed a strange error recently in my application which users. 

When ever i send a byte[] from server to client using Object Encode -
Decoder handlers in my pipleline,
I get the below error. 

I am using netty-3.1.0-Beta3.jar and jdk6 update 11.

I think the below error is related to JDK6 issue
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500212) although i am
not sure about it. Could you check this out let me know a work around for
this.

java.io.InvalidClassException: failed to read class descriptor
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1567)
	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:1947)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
	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.netty.handler.codec.serialization.ObjectDecoder.decode(ObjectDecoder.java:117)
	at
org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:244)
	at
org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:184)
	at
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:87)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:387)
	at
org.jboss.netty.handler.codec.frame.FrameDecoder.fireMessageReceived(FrameDecoder.java:284)
	at
org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:261)
	at
org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:184)
	at
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:87)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:344)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:331)
	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:303)
	at
org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:255)
	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:176)
	at
org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:49)
	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:619)
Caused by: java.lang.ClassNotFoundException: [B
	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:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at
org.jboss.netty.handler.codec.serialization.CompactObjectInputStream.loadClass(CompactObjectInputStream.java:100)
	at
org.jboss.netty.handler.codec.serialization.CompactObjectInputStream.readClassDescriptor(CompactObjectInputStream.java:74)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1565)
-- 
View this message in context: http://n2.nabble.com/byte-array-and-Object-Encoder-%2C-Object-Decoder-tp3113378p3113378.html
Sent from the Netty User Group mailing list archive at Nabble.com.




More information about the netty-users mailing list