Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MarshalException occured when sending socket object to session bean  RSS feed

 
adiyta tvameka
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
Iam sending socket object to a stateful session bean and when iam running my client it is throwing MarshalException,i heard that i have to implement ejbActivate and ejbPassivate.Can any one tell me how to do it..

Exception is:
java.rmi.MarshalException: error marshalling arguments; nested exception is:
java.io.NotSerializableException: java.net.Socket
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:73)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:106)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy1.handleMessage(Unknown Source)
at com.mobiapps.vistar.sessionbean.Test.main(Test.java:67)
Caused by: java.io.NotSerializableException: java.net.Socket
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at org.jboss.invocation.MarshalledValue.<init>(MarshalledValue.java:57)
at org.jboss.invocation.MarshalledInvocation.writeExternal(MarshalledInvocation.java:407)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1264)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:265)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:124)
... 9 more


Thanks in Advance.
Aditya
 
adiyta tvameka
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

Please help me in this matter, it is very important for me and also very important.

Thanks You!
[ June 16, 2006: Message edited by: adiyta tvameka ]
 
ravi bhosale
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As per EJB Spec. only primitive, Serializable object and collection of primitive and Serializable object and remote object can be passed as argument and return from EJB.

serialization in EJB
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!