2 Replies Latest reply on Aug 31, 2010 10:01 PM by giftsamuel asir

    Socket Communication - StreamCorruptedException

    giftsamuel asir Newbie

      Hi,

       

      I am using EJB3 as the client socket and the server socket is a normal java class. My Application server is Sun GlassfishV2. I would like to communicate from the EJBBean(Client) to the server using Jboss Remoting. If I use transport protocol "sslsocket" in the InvokerLocator class means its working fine. But If I use the transport protocol "socket" means I am getting the following exception.

       

      [ERROR] ServerThread - WorkerThread#0[192.168.0.76:36438] exception occurred during first invocation
      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:513)
          at org.jboss.remoting.transport.socket.ServerThread.createServerSocketWrapper(ServerThread.java:907)
          at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:489)
          at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
      Caused by: java.io.StreamCorruptedException: invalid stream header: 806B0103
          at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
          at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
          at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:97)
          at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:54)
          at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:75)
          at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:58)
          at org.jboss.remoting.transport.socket.ClientSocketWrapper.createInputStream(ClientSocketWrapper.java:179)
          at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:162)
          at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:66)
          at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:46)
      

       

      I tried a lot to figure this problem. Please help me to resolve this problem.

      Thanks in Advance!!