3 Replies Latest reply on Sep 10, 2002 8:50 AM by juha

    problems with standalone client for ejb

    marcin

      Hi,

      I have an ejb application, and there are troubles with running standalone client for this app.

      The client code creates InitialContext, lookups for a bean and then when trying to create SessionBean or find some EntityBean i receive the stack trace which is attached at the end of the post (java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.io.StreamCorruptedException: Type code out of range, is 46).
      The same application runs well on JBoss 2.4.6.
      I searched through forums and found some answers to similar errors - the solution is to change to the same VM on the client and server and compile the code in this VM. I did so, but the exception is still raised.

      I run on a different VM's: jdk1.3.1, jdk1.4.0 - the message in the exception is different but i think the reason is the same.
      Anybody has the same problem or standalone client runs well for you?

      Any help will be appreciated.

      Regards

      Marcin

      The stacktrace:

      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.io.StreamCorruptedException: Type code out of range, is 46
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.io.StreamCorruptedException: Type code out of range, is 46
      java.io.StreamCorruptedException: Type code out of range, is 46
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
      at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(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.HomeInterceptor.invoke(HomeInterceptor.java:185)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy0.findByHref(Unknown Source)
      at com.test.search.TestSearchManagerEJB.setUp(TestSearchManagerEJB.java:58)
      at junit.framework.TestCase.runBare(TestCase.java:138)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:131)
      at junit.framework.TestSuite.runTest(TestSuite.java:173)
      at junit.framework.TestSuite.run(TestSuite.java:168)
      at junit.textui.TestRunner.doRun(TestRunner.java:74)
      at junit.textui.TestRunner.start(TestRunner.java:234)
      at junit.textui.TestRunner.main(TestRunner.java:112)