2 Replies Latest reply on Feb 26, 2006 1:40 PM by Dogort Tucky

    [SocketServerInvoker] Failed to accept socket connection

    Martin Heinemann Newbie

      Hi,

      i'm just migrating my application to the RC5 EJB3.
      I changed all the things, so deploying is all fine.

      But if i now trying to connect with my remote client (Swing) to the jboss i get an

      Exception in thread "Thread-1" org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection.
       at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:248)
       at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:131)
       at org.jboss.remoting.Client.invoke(Client.java:258)
       at org.jboss.remoting.Client.invoke(Client.java:221)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
       at $Proxy1.getAllPrescriptionTypes(Unknown Source)
       at lu.tudor.santec.gecam.prescription.gui.widgets.templateeditor.persistence.TemplateFilterPrescriptionTypeGatherer.fireNewSearch(TemplateFilterPrescriptionTypeGatherer.java:55)
       at lu.tudor.santec.gecam.prescription.gui.widgets.util.LookUpThread.run(LookUpThread.java:41)
      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:499)
       at org.jboss.remoting.transport.socket.SocketClientInvoker.getConnection(SocketClientInvoker.java:466)
       at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:244)
       ... 15 more
      Caused by: java.lang.NoClassDefFoundError: org/jboss/serial/io/JBossObjectOutputStream
       at java.lang.Class.getDeclaredConstructors0(Native Method)
       at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
       at java.lang.Class.getConstructor0(Class.java:2640)
       at java.lang.Class.newInstance0(Class.java:321)
       at java.lang.Class.newInstance(Class.java:303)
       at org.jboss.remoting.serialization.SerializationStreamFactory.loadObjectManagerClass(SerializationStreamFactory.java:139)
       at org.jboss.remoting.serialization.SerializationStreamFactory.setManagerClassName(SerializationStreamFactory.java:100)
       at org.jboss.remoting.serialization.SerializationStreamFactory.<clinit>(SerializationStreamFactory.java:73)
       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


      on the client side.

      The server also is doing some stacktracing:

      16:09:17,887 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:431)
       at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:398)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.io.EOFException
       at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2232)
       at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
       at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
       at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
       at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:57)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
       at org.jboss.remoting.transport.socket.ServerSocketWrapper.createInputStream(ServerSocketWrapper.java:56)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:76)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
       at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:50)
       ... 9 more
      


      As i said, deploying is all correct withput any errors.
      Here is my persistence.xml:

      
      <?xml version="1.0" encoding="UTF-8"?>
      <persistence>
       <persistence-unit name="cefip">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:/cefip</jta-data-source>
       <properties>
       <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
       <property name="hibernate.hbm2ddl.auto" value="update"/>
       </properties>
       </persistence-unit>
      </persistence>
      
      


      The datasource is defined in postgres-ds.xml and works.
      I just copied it from my "old" Jboss.

      I'm using JBoss 4.0.3 SP1 and ejb3 RC5.
      I used the installer for my latest jboss.
      The former ones i always built on my own. Might there be the difference?

      Thanks for your help.

      Martin