3 Replies Latest reply on Aug 13, 2008 10:52 AM by Clebert Suconic

    Classloader issues when running Mule in JBoss

    Rajiv Ramaiah Newbie

      Hi,
      I am using Mule to pull objects off of a JMS queue and I get a "classloader not found for" error. I've set the Java2ClassLoadingCompliance flag to true to make some of my other code work, so I'm not sure if that has something to do with it. Can't set it to false or my code won't startup. I have confirmed that the Audit object it is complaining about is definitely in a JAR in the WAR that is running Mule. Ideas? Thanks!

      Oh, and by the way, this only happens when I'm running the app WAR and the Mule WAR on separate machines. When they're on the same machine, talking to each other through a localhost JNDI lookup, everything works fine. Again, I have confirmed that the Audit object in question exists in BOTH wars. I'm using JBoss 4.3 EAP and Mule 2.0.

      ********************************************************************************
      Message : No ClassLoaders found for: com.XXX.audit.beans.Audit (java.lang.RuntimeException)
      Type : org.mule.api.transformer.TransformerException
      Code : MULE_ERROR-64999
      Transformer : JMSMessageToObject{this=d438fd, name='JMSMessageToObject', ignoreBadInput=false, returnClass=class java.lang.Object, sourceTypes=[interface javax.jms.Message, interface javax.jms.TextMessage, interface javax.jms.ObjectMessage, interface javax.jms.BytesMessage, interface javax.jms.MapMessage, interface javax.jms.StreamMessage]}
      JavaDoc : http://mule.mulesource.org/docs/apidocs/org/mule/api/transformer/TransformerException.html
      ********************************************************************************
      Exception stack is:
      1. No ClassLoaders found for: com.XXX.audit.beans.Audit (java.lang.RuntimeException)
       org.jboss.mx.loading.LoadMgr3:306 (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/RuntimeException.html)
      2. No ClassLoaders found for: com.XXX.audit.beans.Audit (java.lang.RuntimeException) (org.mule.api.transformer.TransformerException)
       org.mule.transport.jms.transformers.AbstractJmsTransformer:150 (http://mule.mulesource.org/docs/apidocs/org/mule/api/transformer/TransformerException.html)
      ********************************************************************************
      Root Exception stack trace:
      java.lang.RuntimeException: No ClassLoaders found for: com.XXX.audit.beans.Audit
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:514)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:242)
       at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:585)
       at org.jboss.messaging.util.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:78)
       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.readObject(ObjectInputStream.java:348)
       at org.jboss.messaging.util.StreamUtils.readObject(StreamUtils.java:154)
       at org.jboss.messaging.core.impl.message.MessageSupport.getPayload(MessageSupport.java:246)
       at org.jboss.jms.message.JBossObjectMessage.getObject(JBossObjectMessage.java:125)
       at org.jboss.jms.message.ObjectMessageProxy.getObject(ObjectMessageProxy.java:64)
       at org.mule.transport.jms.JmsMessageUtils.toObject(JmsMessageUtils.java:159)
       at org.mule.transport.jms.transformers.AbstractJmsTransformer.transformFromMessage(AbstractJmsTransformer.java:146)
       at org.mule.transport.jms.transformers.JMSMessageToObject.transform(JMSMessageToObject.java:63)
       at org.mule.transformer.AbstractMessageAwareTransformer.doTransform(AbstractMessageAwareTransformer.java:68)
       at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:254)
       at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:564)
       at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:524)
       at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:517)
       at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:310)
       at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:305)
       at org.mule.routing.inbound.ForwardingConsumer.process(ForwardingConsumer.java:49)
       at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:89)
       at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:604)
       at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:346)
       at org.mule.transport.AbstractReceiverWorker$1.doInTransaction(AbstractReceiverWorker.java:114)
       at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:112)
       at org.mule.transport.AbstractReceiverWorker.doRun(AbstractReceiverWorker.java:131)
       at org.mule.transport.AbstractReceiverWorker.run(AbstractReceiverWorker.java:62)
       at org.mule.work.WorkerContext.run(WorkerContext.java:310)
       at org.mule.work.SyncWorkExecutor.doExecute(SyncWorkExecutor.java:41)
       at org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.java:269)
       at org.mule.work.MuleWorkManager.doWork(MuleWorkManager.java:157)
       at org.mule.transport.jms.MultiConsumerJmsMessageReceiver$SubReceiver.onMessage(MultiConsumerJmsMessageReceiver.java:264)
       at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
       at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
       at org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
       at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
       at java.lang.Thread.run(Thread.java:595)