9 Replies Latest reply on Mar 19, 2003 3:03 AM by Yuri Belokrylov

    MarshalException when creating remote session bean

    Channing Walton Newbie

      I am using a session bean to look up another session bean on a remote JBoss server.

      I found that if the bean's transaction type was 'Container', a MarshallException was thrown when creating the remote session bean from its home.
      If I use 'Bean' transaction type there is no problem.

      Am I doing something wrong ?

      More details:

      I set up an ejb-remote-ref to the remote session bean with corresponding remote ref in JBoss.xml

      I then used the InitialContext to look up the home with the ref and narrowed it.
      The home interface had one create method that took no arguments. When it was invoked, the exception was

      java.rmi.MarshalException: error marshalling arguments; nested exception is:
      java.io.NotSerializableException: org.jboss.tm.TransactionImpl
      java.io.NotSerializableException: org.jboss.tm.TransactionImpl
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
      at org.jboss.invocation.MarshalledInvocation.writeExternal(MarshalledInvocation.java:377)
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1167)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
      at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:263)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
      at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:138)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy36.create(Unknown Source)
      at com.db.fiplus.test.ejb.NodeBean.calculateSpread(NodeBean.java:61)

      Note that whether I use a remote ref or create an InitialCOntext with the appropriate context info made no difference.

      Any ideas?

      Chang