0 Replies Latest reply on Dec 10, 2012 12:22 PM by mikevan

    Strange exception when migrating to HornetQ

    mikevan Newbie

      My legacy application used JBossMQ successfully, however after migrating to JBoss6 (and HornetQ) i am getting the following exception:

       

      10:37:44,361 ERROR [STDERR] javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exceptio

      n is:

      10:37:44,361 ERROR [STDERR]     java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)]]

      10:37:44,362 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1356)

      10:37:44,362 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:819)

      10:37:44,362 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

      10:37:44,362 ERROR [STDERR]     at javax.naming.InitialContext.lookup(InitialContext.java:392)

      10:37:44,362 ERROR [STDERR]     at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154)

      10:37:44,362 ERROR [STDERR]     at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)

      10:37:44,362 ERROR [STDERR]     at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)

      10:37:44,362 ERROR [STDERR]     at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)

      10:37:44,362 ERROR [STDERR]     at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)

      10:37:44,363 ERROR [STDERR]     at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)

      10:37:44,363 ERROR [STDERR]     at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201)

      10:37:44,363 ERROR [STDERR]     at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187)

      10:37:44,363 ERROR [STDERR]     at com.ijet.util.external.domainObject.patch.JmsTemplateFactory.init(JmsTemplateFactory.java:66)

      10:37:44,364 ERROR [STDERR]     at com.ijet.util.external.domainObject.patch.JmsTemplateFactory.<init>(JmsTemplateFactory.java:43)

      10:37:44,364 ERROR [STDERR]     at com.ijet.util.external.patch.ObjectMessageReceiver.start(ObjectMessageReceiver.java:53)

      10:37:44,364 ERROR [STDERR]     at com.ijet.util.external.patch.ObjectMessageReceiver.run(ObjectMessageReceiver.java:37)

      10:37:44,364 ERROR [STDERR]     at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172)

      10:37:44,364 ERROR [STDERR]     at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

      10:37:44,365 ERROR [STDERR]     at org.jboss.threads.CleanupExecutor.execute(CleanupExecutor.java:38)

      10:37:44,365 ERROR [STDERR]     at org.jboss.threads.CleanupExecutor.execute(CleanupExecutor.java:38)

      10:37:44,365 ERROR [STDERR]     at org.jboss.threads.QueuelessExecutor$Worker.run(QueuelessExecutor.java:614)

      10:37:44,365 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:662)

      10:37:44,366 ERROR [STDERR]     at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      10:37:44,378 ERROR [STDERR] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:

      10:37:44,378 ERROR [STDERR]     java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)]

      10:37:44,388 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:841)

      10:37:44,388 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

      10:37:44,388 ERROR [STDERR]     at javax.naming.InitialContext.lookup(InitialContext.java:392)

      10:37:44,389 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1350)

      10:37:44,389 ERROR [STDERR]     ... 22 more

      10:37:44,389 ERROR [STDERR] Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:

      10:37:44,389 ERROR [STDERR]     java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)

      10:37:44,389 ERROR [STDERR]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:178)

      10:37:44,390 ERROR [STDERR]     at org.jboss.ha.framework.server.HARMIServerImpl_Stub.invoke(Unknown Source)

      10:37:44,390 ERROR [STDERR]     at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:225)

      10:37:44,390 ERROR [STDERR]     at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:327)

      10:37:44,390 ERROR [STDERR]     at $Proxy293.lookup(Unknown Source)

      10:37:44,390 ERROR [STDERR]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)

      10:37:44,390 ERROR [STDERR]     ... 25 more

      10:37:44,391 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)

      10:37:44,391 ERROR [STDERR]     at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:373)

      10:37:44,391 ERROR [STDERR] at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:163)
      10:37:44,392 ERROR [STDERR] at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
      10:37:44,392 ERROR [STDERR] at org.jboss.system.JBossRMIClassLoader.loadClass(JBossRMIClassLoader.java:91)
      10:37:44,392 ERROR [STDERR] at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
      10:37:44,392 ERROR [STDERR] at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
      10:37:44,392 ERROR [STDERR] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
      10:37:44,392 ERROR [STDERR] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
      10:37:44,423 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
      10:37:44,423 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      10:37:44,423 ERROR [STDERR] at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
      10:37:44,424 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
      10:37:44,425 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      10:37:44,425 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
      10:37:44,425 ERROR [STDERR] at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
      10:37:44,425 ERROR [STDERR] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)
      10:37:44,425 ERROR [STDERR] ... 30 more

       

      My hornetq-jms.xml file is pretty standard:

      <configuration xmlns="urn:hornetq"

                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">

                 

              <connection-factory name="NettyConnectionFactory">

                 <connectors>

                       <connector-ref connector-name="netty"/>

                 </connectors>

                 <entries>

                       <entry name="/ConnectionFactory"/>

                       <entry name="/XAConnectionFactory"/>

                 </entries>

              </connection-factory>

             

      <!-- JMS destination definitions for AIA updated for JBossAS using HornetQ -->

          <queue name="myQueuet">

              <entry name="/queue/myQueue"/>

          </queue>

      </configuration>

       

      Anyone have an idea what's going on?