5 Replies Latest reply on Dec 26, 2011 11:35 PM by dasmurali

    Issue in connecting from JBoss 4.2.2 to JBoss EAP 5.1.1 Queue

    dasmurali

      Hi All,

       

      We had two applications running in JBoss AS 4.2.2(community version) and JBoss EAP 5.1.1 respectively. One java client running in JBoss 4.2.2 is trying to connect to JMS Queue hosted in JBoss EAP 5.1.1. This communication is not happening properly.

       

      Please find the below jar files that we are copied from JBoss  5 to JBoss 4 instance.

       

      jboss-remoting.jar

      jboss-messaging-client.jar

      jbossha.jar -->(Queue is clustered queue)

       

      Note : When the Queue is hosted in JBoss AS 5.1.0(communitiy version) , we are able to connect from JBoss 4.2.2 with out any issues.

       

      I am guessging some issues with jar version's.

       

       

      Thanks and Regards

      Murali Reddy

        • 1. Re: Issue in connecting from JBoss 4.2.2 to JBoss EAP 5.1.1 Queue
          dasmurali

          Please find more information on this issue.

           

          JBoss Messagig version is different in JBoss 5.1.0(communitiy version) and JBoss EAP 5.1.1. May be newer version is causing the issue. Please find below versions of both JBoss app servers.

           

          JBoss 5.1.0(community version):

          jboss.messaging.providerVersion=1.4.3.GA

           

           

          JB0ss EAP 5.1.1:

          jboss.messaging.providerVersion=1.4.8.SP1

           

           

          Also find the below exception strack trace (from java client running in Jboss 4.2.2)

           

          <code>

          Caused by: java.lang.NoSuchMethodError: org.jboss.aop.AspectManager.instance(Ljava/lang/Class;)Lorg/jboss/aop/AspectManager;

          at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.<clinit>(ClientConnectionFactoryDelegate.java)

          at sun.misc.Unsafe.ensureClassInitialized(Native Method)

          at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)

          at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)

          at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)

          at java.lang.reflect.Field.getFieldAccessor(Field.java:899)

          at java.lang.reflect.Field.getLong(Field.java:528)

          at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1614)

          at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)

          at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:425)

          at java.security.AccessController.doPrivileged(Native Method)

          at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:413)

          at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)

          at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:547)

          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)

          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)

          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)

          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)

          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)

          at java.rmi.MarshalledObject.get(MarshalledObject.java:142)

          at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)

          at javax.naming.InitialContext.lookup(InitialContext.java:392)

          </code>

           

          Thanks and Regards

          Murali Reddy

          • 2. Re: Issue in connecting from JBoss 4.2.2 to JBoss EAP 5.1.1 Queue
            dasmurali

            I copied few more jars (from JBoss EAP 5.1.1. to JBoss AS 4.2.2) . Find the below jar details.

             

            1. trove.jar from http://repository.jboss.org/trove/2.1.1/lib/

            2. jboss-aop.jar from http://repository.jboss.org/jboss/aop/2.1.6.GA/lib/

            3. jboss-common-core.jar      ($JBOSS_EAP_511/lib)

            4. javassist.jar                    ($JBOSS_EAP_511/lib)

            5. jboss-mdr.jar                    ($JBOSS_EAP_511/lib)

            6. trove.jar                    ($JBOSS_EAP_511/lib)

             

            Now I am getting some new exception. Please find the below exception stack trace for the same.

             

             

            2011-12-05 05:17:38,747 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/home/jboss/jboss-4.2.2/server/SIPortal/deploy/jboss-portal.sar/conf/data/default-object.xmlorg.jboss.deployment.DeploymentException: Unable to locate current JTA transaction; - nested throwable: (org.hibernate.HibernateException: Unable to locate current JTA transaction)
            at org.jboss.portal.core.deployment.jboss.ObjectDeployment.start(ObjectDeployment.java:101)
            at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
            at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.start(PortalDeploymentInfoContext.java:211)
            at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:217)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy153.deploy(Unknown Source)

             

            Note: My client is running in Jboss 4.2.2 (which had jboss portal 2.6)

             

            Thanks and Regards

            Murali Reddy

            • 3. Re: Issue in connecting from JBoss 4.2.2 to JBoss EAP 5.1.1 Queue
              jaikiran

              (Randomly) copying jars from one server version to another isn't going to work. Without all this copying around what error do you get and what does the code look like on the client side? I don't even know if this kind of scenario is supported by JBoss Messaging.

              • 4. Re: Issue in connecting from JBoss 4.2.2 to JBoss EAP 5.1.1 Queue
                dasmurali

                Hi Jaikiran,

                 

                Thank you for your reply.

                 

                We had two appplications running in JBoss 4.2.2 and 5.1.0 (community versions). Java client (running in Jboss 4.2.2) trying to connect to JMS Queue(cluster queue) hosted in JBoss 5.1.0. This setup is working good in production. For this I copied jboss-messaging-client.jar, jboss.remoting.jar and jboss-ja.jar from JBoss 5.1.0 to Jboss 4.2.2 server.

                 

                Now we are migrating all our app servers to JBoss EAP 5.1.1(form JBoss 5.1.0 community version). When the java client (running in JBoss 4.2.2 community version) is tryign to connect to clustered queue hosted in JBoss EAP 5.1.1(after copying jboss-messaging-client.jar, jboss.remoting.jar and jboss-ja.jar from JBoss EAP 5.1.1 to Jboss 4.2.2 server), I am getting exception like below

                 

                 

                Caused by: java.lang.NoSuchMethodError: org.jboss.aop.AspectManager.instance(Ljava/lang/Class;)Lorg/jboss/aop/AspectManager;

                at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.<clinit>(ClientConnectionFactoryDelegate.java)

                at sun.misc.Unsafe.ensureClassInitialized(Native Method)

                at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)

                at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)

                at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)

                at java.lang.reflect.Field.getFieldAccessor(Field.java:899)

                at java.lang.reflect.Field.getLong(Field.java:528)

                at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1614)

                at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)

                at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:425)

                at java.security.AccessController.doPrivileged(Native Method)

                at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:413)

                at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)

                at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:547)

                at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)

                at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)

                at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)

                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

                at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)

                at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)

                at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)

                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)

                at java.rmi.MarshalledObject.get(MarshalledObject.java:142)

                at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)

                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)

                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)

                at javax.naming.InitialContext.lookup(InitialContext.java:392)

                 

                 

                Please find my java client code(typical JMS client code)

                 

                 

                <code>

                 

                 

                 

                 

                 

                 

                      Properties p = new Properties();
                      p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                      p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
                      p.put(Context.PROVIDER_URL, jndiUrl);
                      Context context = new InitialContext(p);

                 

                      QueueConnectionFactory factory = (QueueConnectionFactory) context.lookup(CONNECTION_FACTORY_NAME);
                      javax.jms.Queue eventQueue = (javax.jms.Queue) context.lookup(QUEUENAME);

                 

                </code>

                 

                Thanks and Regards

                Murali Reddy

                • 5. Re: Issue in connecting from JBoss 4.2.2 to JBoss EAP 5.1.1 Queue
                  dasmurali

                  Finally we desided and migrated client application (from JBoss 4.2.2 community version) to JBoss EAP 4.3(which is having JBoss Messaging as default JMS provider ). This is working good.

                   

                  Thanks and Regards

                  Murali Reddy

                  1 of 1 people found this helpful