Ok, found it. It's caused by the design of org.jgroups.blocks.MethodCall.

MethodCall is used to call a remote method and for this it provides an an serialized 
(externalized) Version of the method's signature. 
primitive Types are externalized using their primitive Class (e.g. Boolean.TYPE).
Lateron this is sent using org.jgroups.util.Util.objectToByteBuffer and retrieved on 
the other side using org.jgourps.util.Util.objectFromByteBuffer() which make use of 
ObjectOutputStream and ObjectInputStream.

the ObjectInputStream of SUNs JVM 1.3.1 doesn't support these primitive-types since it 
uses a Class.forName() to resolve an Object's Class.

this code-to-reproduce runs well on SUNs JVM 1.4.2, but fails on SUNs JVM 1.3.1:

import java.io.*;

public class ObjectInputOutput {

public static void main(String[] args) {
                try {
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        ObjectOutputStream oos = new ObjectOutputStream(baos);
                        oos.writeObject(Boolean.TYPE);
                        byte[] ba = baos.toByteArray();
                        ByteArrayInputStream bais = new ByteArrayInputStream(ba);
                        ObjectInputStream ois = new ObjectInputStream(bais);
                        System.out.println(ois.readObject());
                } catch (Exception e) {
                        e.printStackTrace(System.out);
                }
        }
}

java com.bmw.test.ObjectInputOutput

->

java.lang.ClassNotFoundException: boolean
        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:297)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:195)
        at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654)
        at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
        at com.bmw.test.ObjectInputOutput.main(ObjectInputOutput.java:27)



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845770#3845770

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845770


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to