1 Reply Latest reply on Jun 18, 2013 4:53 AM by chandramoulee mukherjee

    exception occurred during first invocation java.net.SocketException: Connection reset

    chandramoulee mukherjee Newbie

      Hi,

           I' m new in Jboss. I've created a JPA project using -

      1. Jboss 6.0

      2. Eclipse Helios

      3. Oracle 10g Database.

       

      The JPA is successfully deployed in Jboss AS. But, when I'm trying to invoke the remote class from my local client, I'm getting below error -

       

      18:12:28,436 INFO  [AbstractServer] JBossAS [6.0.0.M1 (build: SVNTag=JBoss_6_0_0_M1 date=200912040958)] Started in 1m:3s:516ms

      18:12:44,936 ERROR [ServerThread] WorkerThread#0[127.0.0.1:4622] exception occurred during first invocation

      java.net.SocketException: Connection reset

          at java.net.SocketInputStream.read(Unknown Source)

          at java.io.BufferedInputStream.fill(Unknown Source)

          at java.io.BufferedInputStream.read(Unknown Source)

          at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)

          at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(Unknown Source)

          at java.io.ObjectInputStream$BlockDataInputStream.refill(Unknown Source)

          at java.io.ObjectInputStream$BlockDataInputStream.read(Unknown Source)

          at java.io.ObjectInputStream.read(Unknown Source)

          at org.jboss.remoting.transport.socket.ServerThread.readVersion(ServerThread.java:1081)

          at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)

          at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)

          at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

      18:16:23,423 ERROR [ServerThread] WorkerThread#0[127.0.0.1:4647] exception occurred during first invocation

      java.io.EOFException

          at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:717)

          at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)

          at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

      18:17:26,112 INFO  [SessionSpecContainer] Stopping jboss.j2ee:ear=CartStateFull.ear,jar=CartStateFullEJB.jar,name=CartBean,service=EJB3

      18:17:26,174 INFO  [EJBContainer] STOPPED EJB: javaee.ejb.CartBean ejbName: CartBean

      18:17:41,065 ERROR [ServerThread] WorkerThread#0[127.0.0.1:4653] exception occurred during first invocation

      java.io.EOFException

          at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:717)

          at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)

          at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

       

      Here is my client code -

       

      <all required Imports>

       

      public class RosterClient {

         

          private static RosterRequest request;

       

          /**

           * @param args

           */

          public static void main(String[] args) {

             

              Properties props = new Properties();

              props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");

              props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");

              props.put(Context.PROVIDER_URL,"localhost:1099");

              InitialContext ctx;

              try {

                  ctx = new InitialContext(props);

                  System.out.println((ctx==null)? "InitialContext is null" : "InitialContext is not null");

                  request = (RosterRequest) ctx.lookup("RosterRequestBean/remote");

                                          

              } catch (NamingException e) {

                 e.printStackTrace();

              }

              catch(Exception e)

              {

                  e.printStackTrace();

                 

              }

         

          }

       

      Can any one please help me on this? I'm not getting the cause for this exception. Please Help.

        • 1. Re: exception occurred during first invocation java.net.SocketException: Connection reset
          chandramoulee mukherjee Newbie

          Life is fun .. After every time I post my query in this forum, I find the answer by my own. Same for this as well. Below is a list of all jars I have included in my ejb client. And the issue is resolved -

           

          1. ejb3-persistence.jar

          2. jboss-aop.jar

          3. concurrent.jar

          4. jboss-common-core.jar

          5. jboss-logging-spi.jar

          6. jbossall-client.jar

          7. jboss-ejb3-common.jar

          8. jboss-ejb3-core.jar

          9. jboss-ejb3-proxy-clustered.jar

          10.jboss-ejb3-proxy-impl.jar

          11.jboss-ejb3-proxy-spi.jar

          12.jboss-ejb3-security.jar

          13.jboss-integration.jar

          14.jboss-javaee.jar

          15.jboss-logging-spi.jar

          16.jboss-remoting.jar

          17.jboss-remoting-aspects.jar

          18.jboss-security-spi.jar

          19.jbosssx.jar

          20.jboss-transaction-aspects.jar

          21.jnpserver.jar

          22. <application ejb jar>