3 Replies Latest reply on Feb 17, 2006 8:43 AM by Jan Philipp Giel

    Migration JBoss 4.0.3 --> JBoss 4.0.4

    milan wölke Newbie

      Hello,
      I just migrated my EJB 3 application to JBoss 4.0.4. I did everything needed to make it compile and deploy. Works fine. But when I try to access the deployed application I keep getting the following exception:

      client side:

      Exception in thread "main" org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection.
       at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:253)
       at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:136)
       at org.jboss.remoting.Client.invoke(Client.java:444)
       at org.jboss.remoting.Client.invoke(Client.java:407)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
       at $Proxy0.installRootUser(Unknown Source)
       at de.psitrans.vl.base.security.RootInstallerClient.installRoot(RootInstallerClient.java:29)
       at de.psitrans.vl.base.security.RootInstallerClient.main(RootInstallerClient.java:17)
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at org.jboss.remoting.transport.socket.SocketClientInvoker.createClientSocket(SocketClientInvoker.java:504)
       at org.jboss.remoting.transport.socket.SocketClientInvoker.getConnection(SocketClientInvoker.java:471)
       at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:249)
       ... 15 more
      Caused by: java.lang.NoClassDefFoundError
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.createOutputStream(ClientSocketWrapper.java:91)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:75)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
       ... 22 more
      


      server side:

      12:26:08,020 ERROR [SocketServerInvoker] Failed to accept socket connection
      java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at org.jboss.remoting.transport.socket.ServerThread.createServerSocket(ServerThread.java:147)
       at org.jboss.remoting.transport.socket.ServerThread.<init>(ServerThread.java:84)
       at org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:434)
       at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:401)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.net.SocketException: Connection reset by peer: socket write error
       at java.net.SocketOutputStream.socketWrite0(Native Method)
       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
       at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
       at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
       at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1622)
       at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:655)
       at org.jboss.remoting.transport.socket.ServerSocketWrapper.createOutputStream(ServerSocketWrapper.java:65)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:75)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
       at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:50)
       ... 9 more
      


      I guess its a classpath problem, but I dont know where to start my search of the missing class.
      Please help.

      Thanx in advance,
      milan wölke

        • 1. Re: Migration JBoss 4.0.3 --> JBoss 4.0.4
          Gus Gu Expert

          Yes, I have the same problem. I just want to wait for new release of DVD Store Demo Application, then check what should be changed.

          • 2. Re: Migration JBoss 4.0.3 --> JBoss 4.0.4
            Martin Heinemann Newbie

            Hi,

            i had the same problem.
            This exceptions occurs because the new JBoss does not use the ObjectInputStream classes shiped with the jdk.
            They wrote their own serialisation package with better performance.
            You have to include the jboss-serialization.jar which can be found in server/default/lib

            • 3. Re: Migration JBoss 4.0.3 --> JBoss 4.0.4
              Jan Philipp Giel Newbie

              I went the one-by-one approach on testing which libraries are required for compiling and running my swing client, so i hope this is the complete list of required jboss libs (of course, don't forget the additional libraries you need for your gui, e.g. jgoodies looks)

              - JBoss ALL Client ( <jboss-dir>/client/jbossall-client.jar )
              - JBoss Aspect Library ( <jboss-dir>/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aspect-library-jdk50.jar )
              - Code Generation Library ( <jboss-dir>/server/default/deploy/ejb3.deployer/cglib-2.1_2jboss.jar )
              - ASM bytecode manipulation ( <jboss-dir>/server/default/deploy/ejb3.deployer/asm.jar )
              
              To display hibernate's sql exceptions you need a jdbc library - the one that jboss uses for the datasource (e.g. postgresql-8.0-315.jdbc3.jar if you're using this for jboss cmp)