Bugs item #601049, was opened at 2002-08-27 16:26
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=601049&group_id=22866

Category: JBossServer
>Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Yan Pujante (madonnax)
>Assigned to: Scott M Stark (starksm)
Summary: MarshalException in serializing Handle

Initial Comment:
I have the following code:

    // userSession is stateful session bean
    Handle ser = userSession.getHandle();
    ByteArrayOutputStream baos = new
ByteArrayOutputStream();

    ObjectOutputStream oos = new ObjectOutputStream(baos);

    oos.writeObject(ser);


this throws the following exception:

15:57:19,944 ERROR [STDERR] java.rmi.MarshalException:
Invalid remote object
15:57:19,946 ERROR [STDERR]     at
java.rmi.server.RemoteObject.writeObject(RemoteObject.java:332)
15:57:19,948 ERROR [STDERR]     at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:57:19,950 ERROR [STDERR]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:57:19,951 ERROR [STDERR]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:57:19,952 ERROR [STDERR]     at
java.lang.reflect.Method.invoke(Method.java:324)
15:57:19,953 ERROR [STDERR]     at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:780)
15:57:19,955 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1294)
15:57:19,956 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
15:57:19,957 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
15:57:19,961 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
15:57:19,962 ERROR [STDERR]     at
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.writeExternal(JRMPInvokerProxy.java:149)
15:57:19,963 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1265)
15:57:19,965 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1243)
15:57:19,966 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
15:57:19,967 ERROR [STDERR]     at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
15:57:20,118 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
15:57:20,119 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
15:57:20,120 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
15:57:20,121 ERROR [STDERR]     at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)

A javax.ejb.Handle is supposed to be serializable so
this should work.

OS: Solaris 8
JDK 1.4.0_01
jboss: jboss-3.0.1RC1_tomcat-4.0.4

----------------------------------------------------------------------

>Comment By: Scott M Stark (starksm)
Date: 2002-09-25 08:53

Message:
Logged In: YES 
user_id=175228

Fixed for 3.0.3+ releases

----------------------------------------------------------------------

Comment By: Sandra Schmidt (sandresen)
Date: 2002-09-24 23:40

Message:
Logged In: YES 
user_id=617171

My problem is similar to yours. I tried to save the 
RemoteInterfaceHandle of a Stateful Session Bean in 
HttpSession with the same errormessage as a result. 
javax.ejb.Handle is an Interface, so what really is stored in 
the session is the implementation of that interface.
I found out 
that "org.jboss.proxy.ejb.handle.StatefulHandleImpl" which 
implements "javax.ejb.Handle" contains an instance 
of "org.jboss.invocation.Invoker" which seems to be not 
serializable (respectively the class that implements the 
invoker-
interface: "org.jboss.invocation.jrmp.interfaces.JRMPInvokerPr
oxy"). 
Don`t know, if that helps or if that is the root cause of the 
error but I hope that something about this problem is done or 
at least a workaround is presented.

OS: Windows XP
JDK 1.4.0
with 
JBoss 3.0.2_tomcat 4.0.4

----------------------------------------------------------------------

Comment By: Bernd Zeitler (frito)
Date: 2002-08-30 03:55

Message:
Logged In: YES 
user_id=603154

I did encounter the same difficulties. The handle of a SSB you 
obtain in a java application is serializable, while the handle 
you obtain inside JBoss is not.

OS: W2K
JDK 1.4.0_01
with
JBoss 3.0.0_tomcat-4.0.3, JBoss 3.0.1_tomcat-4.0.4, JBoss 
3.0.2


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=601049&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to