2 Replies Latest reply on Jun 13, 2016 5:27 AM by sunny107842

    Error when a unix process is trying to connect to the jboss EAP 6.2 server and trying to do a batch update

    sunny107842

      We are currently using jboss 5.1 and we are now migrating to jboss eap 6.2.

       

      our application has a client side and ejb side which involves remote lookup.

       

      After initial issues ,we are now successfully able to migrate and our application is working fine.

       

      But when we try to run the unix scripts which are also using same ear and jars, we are facing issues.

       

      The issues comes when unix script tries to do a batch update and the script suddently fails with the message

       

       

       

      Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000032: Cannot retry a request which hasn't previously been completed

       

      The ejb is  a stateless bean and we are doing a no of initial lookups.

       

      Could someone please advise and let us know what exactly is wrong because the same code is working in eclipse and is failing on the unix side.

        • 1. Re: Error when a unix process is trying to connect to the jboss EAP 6.2 server and trying to do a batch update
          jaikiran

          Please post the entire exception stacktrace and relevant client side code which involves interacting with the EJB.

          • 2. Re: Error when a unix process is trying to connect to the jboss EAP 6.2 server and trying to do a batch update
            sunny107842

            Thanks for the reply .

             

            The full error which we are getting on the unix side is.

             

             

            Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000032: Cannot retry a request which hasn't previously been completed

                    at org.jboss.ejb.client.EJBClientInvocationContext.retryRequest(EJBClientInvocationContext.java:200)

                    at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:256)

                    at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:265)

                    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:198)

                    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)

                    at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)

                    at $Proxy0.execute(Unknown Source)

                    at com.sbc.caliber.common.commandbean.ClientCommandBean.execute(ClientCommandBean.java:190)

                    at com.sbc.caliber.engine.client.CaliberEngineCalculationJob.execute(CaliberEngineCalculationJob.java:224)

                    at com.sbc.caliber.engine.client.CaliberEngineCalculationJob.main(CaliberEngineCalculationJob.java:373)

             


            we are trying to connect to EJB through the following code.

             

              Properties clientProp = new Properties();

             

                  clientProp.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

                  clientProp.put("jboss.naming.client.ejb.context", "true");

                  clientProp.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");

                  clientProp.put("remote.connections", "default");

             

                  clientProp.put("remote.connection.default.host",Host_NAME); // comes from JVM argument

                  clientProp.put("remote.connection.default.port","5247"); // comes from JVM argument

                  clientProp.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");

                  clientProp.put("remote.connection.default.connect.options.org.jboss.remoting3.RemotingOptions.HEARTBEAT_INTERVAL", "60000");

             

             

                clientProp.put(Context.SECURITY_PRINCIPAL, "caliber");

             

             

                clientProp.put(Context.SECURITY_CREDENTIALS, "caliber@22");

             

             

                EJBClientConfiguration selector = new PropertiesBasedEJBClientConfiguration(clientProp);

                ContextSelector<EJBClientContext> selector1 = new ConfigBasedEJBClientContextSelector(selector);

                EJBClientContext.setSelector(selector1);

             

             

                _InitContext  = new InitialContext( clientProp );

             

             


            the look up string which is used is

             

            String bean = "ejb:CaliberEARProject/CaliberEJBProject/EngineRunManagerBean!ejb.EngineRunManager";

             

            The code is working fine from the eclipse , but failing from the unix side. in which a script calls the ejb code.