1 Reply Latest reply on Jun 20, 2008 3:41 AM by ron_sigal

    Trouble testing EJB's with Client

    karen.kramer

      I just installed JBoss 4.2.2 GA and was trying to test Beans using a client in Eclipse and getting error messages.

      On the server:
      java.io.EOFException
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:530)

      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
      and from LOG:
      2008-06-18 13:29:47,935 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WorkerThread#0[127.0.0.1:1550] closing socketWrapper: ServerSocketWrapper[Socket[addr=/127.0.0.1,port=1550,localport=4446].18f7f27]
      2008-06-18 13:29:47,935 DEBUG [org.jboss.remoting.transport.socket.ServerSocketWrapper] wrote CLOSING
      2008-06-18 13:29:47,935 DEBUG [org.jboss.remoting.transport.socket.SocketWrapper] ServerSocketWrapper[Socket[addr=/127.0.0.1,port=1550,localport=4446].18f7f27] closing
      2008-06-18 13:30:20,544 TRACE [org.jboss.remoting.transport.socket.SocketServerInvoker] passed through ServerSocketRefresh.release()
      2008-06-18 13:30:20,544 TRACE [org.jboss.remoting.serialization.impl.java.JavaSerializationManager] Creating ObjectOutputStream
      2008-06-18 13:30:20,544 TRACE [org.jboss.remoting.serialization.impl.java.JavaSerializationManager] Creating ObjectInputStreamWithClassLoader
      2008-06-18 13:30:20,607 DEBUG [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset timeout: 60000
      2008-06-18 13:30:20,607 ERROR [org.jboss.remoting.transport.socket.ServerThread] Worker thread initialization failure

      In the console of Eclipse I when I run the client:

      (socket.SocketClientInvoker 293 ) Got marshalling exception, exiting
      java.io.OptionalDataException
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1310)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
      at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
      at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
      at org.jboss.invocation.unified.marshall.InvocationUnMarshaller.read(InvocationUnMarshaller.java:51)
      at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
      at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
      at org.jboss.remoting.Client.invoke(Client.java:525)

      I am pointing to all of the jars on the jboss server in the build path of the project that I running the client in so that I am using the same exact jbossall-client.jar.

      Snippet from client:

      ejbHomeInterface = this.getHomeInterface( jndiName, _class );
      interfaceImpl = ejbHomeInterface.getClass();
      method = interfaceImpl.getMethod( CREATE, null );

      Fails here on the invoke method:
      remoteInterface = method.invoke( ejbHomeInterface, null );

      I am using jdk1.5.0_06...don't think that matters, does it?
      Not using EJB 3, this is part of a conversion from Weblogic 8.1

      Any ideas....I've tried everything that I can think of.

        • 1. Re: Trouble testing EJB's with Client
          ron_sigal

          Hi Karen,

          Well, the OptionalDataException suggests a mismatch between the versions of jboss-remoting.jar on the client and on the server. I know you've said that you're using jars from the ApplicationServer, but it might be worth checking again. You can get the version by running

           java -jar jboss-remoting.jar
          


          -Ron