byte array and Object Encoder , Object Decoder

"이희승 (Trustin Lee)" trustin at gmail.com
Thu Jun 18 10:29:03 EDT 2009


Hello Manish,

Thanks for reporting the problem.  There was a bug in ObjectEncoder -
https://jira.jboss.org/jira/browse/NETTY-178

I've just checked in the fix at revision 1445.  You could wait a couple
hours and pick up the nightly build to see if the fix works, or build
from trunk by yourself.  Please let me know if my fix worked for you.

HTH,
Trustin

On 2009-06-18 오후 10:49, manish_iitg wrote:
> 
> 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)


-- 
— Trustin Lee, http://gleamynode.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20090618/8f829e49/attachment.bin 


More information about the netty-users mailing list