5 Replies Latest reply on Jul 25, 2008 12:02 PM by phuochan

    ClassNotFoundException for ObjectRefAddr when using JMSRoute

    phuochan

      Hi all,

      I'm running jbossesb-server-4.3.GA and jboss-4.2.2.GA on the same machine. I modified Jms_router example to specify a new action to direct a message from jbossesb-server-4.3.GA to another queue running on jboss-4.2.2.GA.












      I got this error after deploying Quickstart_JMS_Router.esb:


      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.mq.referenceable.ObjectRefAddr (no security manage
      r: RMI class loader disabled)
      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
      at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
      at org.jboss.system.JBossRMIClassLoader.loadClass(JBossRMIClassLoader.java:91)
      at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
      at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:139)
      ... 70 more

      Thanks,
      Paul

        • 1. Re: ClassNotFoundException for ObjectRefAddr when using JMSR
          phuochan

          I forgot to include the action in jboss-esb.xml

           <action name="routeToReplyQueue2" class="org.jboss.soa.esb.actions.routing.JMSRouter">
           <property name="jndi-context-factory" value="org.jnp.interfaces.NamingContextFactory"/>
           <property name="jndi-URL" value="127.0.0.1:11099"/>
           <property name="jndi-pkg-prefix" value="org.jboss.naming:org.jnp.interfaces"/>
           <property name="connection-factory" value="ConnectionFactory"/>
           <property name="jndiName" value="queue/A"/>
           <property name="unwrap" value="true"/>
           <property name="security-principal" value="guest"/>
           <property name="security-credential" value="guest"/>
           </action>
          



          • 2. Re: ClassNotFoundException for ObjectRefAddr when using JMSR
            kconner

            Did you include jbossmq-client.jar on the client side?

            • 3. Re: ClassNotFoundException for ObjectRefAddr when using JMSR
              phuochan

              Hi Kevin,

              The client sent the a JMS message to jboss-esb without a problem. JBoss-esb received the message, printed out the content of the message, but failed to perform JMS Route to queue/A of another JBoss instance. The error was printed out on the jboss-esb console.

              I don't know what I need to configure either jboss-esb and/or jboss so the message can be routed properly.

              Thanks,
              Paul

              • 4. Re: ClassNotFoundException for ObjectRefAddr when using JMSR
                kconner

                You are mixing up different JMS implementations in the two servers, jbossesb-server is pre-configured with JBoss Messaging whereas jboss-4.2.2 still uses JBossMQ.

                Your client is sending a message to the jbossesb-server using JBoss messaging but that server is then being asked to send a new message to the jboss-4.2.2 instance using a different provider (JBossMQ).

                For this to be possible the jbossesb-server must also have access to the jbossmq-client.jar (it is the client to the jboss-4.2.2 server).

                Please place a copy of the jbossmq-client.jar within the server/default/lib directory of the jbossesb-server and try once more.

                • 5. Re: ClassNotFoundException for ObjectRefAddr when using JMSR
                  phuochan

                  Hi Kevin,

                  Thanks for your help. I can see the messages coming through to the second JBoss server.

                  Paul