Bugs item #554653, was opened at 2002-05-10 12:54
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=554653&group_id=22866
Category: JBossServer
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Fixed
Priority: 8
Submitted By: Steve Wolfangel (swolfangel)
Assigned to: Scott M Stark (starksm)
Summary: java.rmi.MarshalException calling EJB
Initial Comment:
0RC1_tomcat-4.0.3/server/default/conf/
12:52:02,022 INFO [Server] Server Library URL:
file:/D:/jboss/server30/jboss-3.0
.0RC1_tomcat-4.0.3/server/default/lib/
12:52:02,037 INFO [Server] Starting General Purpose
Architecture (GPA)...
12:52:03,397 INFO [Log4jService] Started
12:52:03,412 INFO [ServerInfo] Java version:
1.3.1,Sun Microsystems Inc.
12:52:03,412 INFO [ServerInfo] Java VM: Java HotSpot
(TM) Client VM 1.3.1-b24,Sun
Microsystems Inc.
12:52:03,428 INFO [ServerInfo] OS-System: Windows NT
4.0,x86
12:52:03,522 INFO [ServiceController] Controller
MBean online
I am getting the following exception when passing in a
remote object to an EJB call. EventReceiver is the
callback object that I am passing into the bean. This
code works fine with JBoss 2.4.4 just not with 3.0. I
should also note that remote objects returned by an
EJB call work fine it is only when I am passing in a
remote object.
Also, with 3.0 am I required to rmic my remote objects
and ejbc my beans?
Thanks,
Steve Wolfangel
MetaMatrix
java.rmi.MarshalException: error marshalling
arguments; nested exception is:
java.io.NotSerializableException:
com.metamatrix.server.serverapi.callback.EventReceiver
java.io.NotSerializableException:
com.metamatrix.server.serverapi.callback.EventReceiver
at java.io.ObjectOutputStream.outputObject
(ObjectOutputStream.java:1148)
at java.io.ObjectOutputStream.writeObject
(ObjectOutputStream.java:366)
at java.io.ObjectOutputStream.outputClassFields
(ObjectOutputStream.java:1827)
at
java.io.ObjectOutputStream.defaultWriteObject
(ObjectOutputStream.java:480)
at java.io.ObjectOutputStream.outputObject
(ObjectOutputStream.java:1214)
at java.io.ObjectOutputStream.writeObject
(ObjectOutputStream.java:366)
at java.io.ObjectOutputStream.outputArray
(ObjectOutputStream.java:1098)
at
java.io.ObjectOutputStream.checkSubstitutableSpecialCla
sses(ObjectOutputStream.java:456)
at java.io.ObjectOutputStream.writeObject
(ObjectOutputStream.java:361)
at org.jboss.invocation.MarshalledValue.<init>
(MarshalledValue.java:48)
at
org.jboss.invocation.MarshalledInvocation.writeExternal
(MarshalledInvocation.java:317)
at java.io.ObjectOutputStream.outputObject
(ObjectOutputStream.java:1172)
at java.io.ObjectOutputStream.writeObject
(ObjectOutputStream.java:366)
at sun.rmi.server.UnicastRef.marshalValue
(UnicastRef.java:268)
at sun.rmi.server.UnicastRef.invoke
(UnicastRef.java:106)
at
org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invok
e(Unknown Source)
at
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.i
nvoke(JRMPInvokerProxy.java:128)
at
org.jboss.invocation.InvokerInterceptor.invoke
(InvokerInterceptor.java:108)
at
org.jboss.proxy.TransactionInterceptor.invoke
(TransactionInterceptor.java:73)
at org.jboss.proxy.SecurityInterceptor.invoke
(SecurityInterceptor.java:76)
at
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke
(StatelessSessionInterceptor.java:111)
at org.jboss.proxy.ClientContainer.invoke
(ClientContainer.java:96)
at $Proxy3.submitRequest(Unknown Source)
at
com.metamatrix.server.apiimpl.MetaMatrixServerConnectio
nImpl.submitRequest
(MetaMatrixServerConnectionImpl.java:527)
at
com.metamatrix.server.apiimpl.QueryImpl.executeInternal
Asynch(QueryImpl.java:388)
at
com.metamatrix.server.apiimpl.QueryImpl.executeInternal
Synch(QueryImpl.java:291)
at
com.metamatrix.server.apiimpl.QueryImpl.execute
(QueryImpl.java:190)
at
com.metamatrix.querybuilder.ui.views.MetadataTreeModel.
setUpModel(DataNodesView.java:83)
at
com.metamatrix.querybuilder.ui.views.MetadataTreeModel.
<init>(DataNodesView.java:74)
at
com.metamatrix.querybuilder.ui.views.DataNodesView.crea
teComponent(DataNodesView.java:28)
at
com.metamatrix.querybuilder.ui.views.SQLQueryView.creat
eComponent(SQLQueryView.java:111)
at
com.metamatrix.querybuilder.ui.ViewFactory.createView
(ViewFactory.java:28)
at
com.metamatrix.querybuilder.ui.QueryTabSpace.createComp
onent(QueryTabSpace.java:44)
at
com.metamatrix.querybuilder.ui.ViewController.startView
(ViewController.java:376)
at
com.metamatrix.querybuilder.main.QueryBuilderMain.start
View(QueryBuilderMain.java:64)
at
com.metamatrix.querybuilder.main.QueryBuilderMain.init
(QueryBuilderMain.java:48)
at
com.metamatrix.querybuilder.main.QueryBuilderMain.main
(QueryBuilderMain.java:29)
----------------------------------------------------------------------
>Comment By: Scott M Stark (starksm)
Date: 2002-05-18 07:14
Message:
Logged In: YES
user_id=175228
Fixed by adding replaceObject to MarshalledValueOutputStream
----------------------------------------------------------------------
Comment By: Steve Wolfangel (swolfangel)
Date: 2002-05-14 10:35
Message:
Logged In: YES
user_id=541224
Correction, change was made to MarshalledValue not
MarshalledObject
----------------------------------------------------------------------
Comment By: Steve Wolfangel (swolfangel)
Date: 2002-05-14 10:33
Message:
Logged In: YES
user_id=541224
I made the following hack to MarshalledObject and my
problem is fixed. I'm sure this is not the final solution
but it did prove that the remote objects are not getting
marshalled correctly.
public MarshalledValue(Object obj) throws IOException
{
// Test
java.rmi.MarshalledObject mObj = new
java.rmi.MarshalledObject(obj);
try {
obj = mObj.get();
} catch (Exception e) {
e.printStackTrace();
throw new IOException(e.getMessage());
}
ByteArrayOutputStream baos = new ByteArrayOutputStream
();
MarshalledValueOutputStream mvos = new
MarshalledValueOutputStream(baos);
mvos.writeObject(obj);
mvos.flush();
serializedForm = baos.toByteArray();
// Use the java.rmi.MarshalledObject hash code
calculation
int hash = 0;
for (int i = 0; i < serializedForm.length; i++)
{
hash = 31 * hash + serializedForm[i];
}
hashCode = hash;
}
----------------------------------------------------------------------
Comment By: Steve Wolfangel (swolfangel)
Date: 2002-05-13 07:01
Message:
Logged In: YES
user_id=541224
RC2 did not fix the problem. I did have many
IllegalAccessExceptions that I had to fix (by making
protected and package methods public), after fixing I had
the same problem trying to pass a remote object into an ejb
method. (This worked with 2.4.4)
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-05-10 12:56
Message:
Logged In: YES
user_id=175228
Get the RC2 release.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=554653&group_id=22866
_______________________________________________________________
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development