11 Replies Latest reply: Mar 16, 2007 12:17 PM by Clebert Suconic RSS

    Classloading issues with EJBs; messages in EJB classloader

    Elias Ross Master


      I use an ObjectMessage that uses a class that's scoped within my .ear classloader.

      What ends up happening is this:

      Caused by: java.lang.RuntimeException: No ClassLoaders found for: com.playphone.
      msg.Message
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryCl
      assLoader.java:511)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassL
      oader.java:405)
       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 java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:154
      4)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
      699)
       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:172)
      
       at org.jboss.messaging.core.message.MessageSupport.readPayload(MessageSu
      pport.java:436)
       at org.jboss.messaging.core.message.MessageSupport.getPayload(MessageSup
      port.java:273)
       at org.jboss.jms.message.JBossObjectMessage.getObject(JBossObjectMessage
      .java:119)
       at org.jboss.jms.message.ObjectMessageProxy.getObject(ObjectMessageProxy
      .java:64)
       at com.playphone.msg.BaseMDB.onMessage(BaseMDB.java:83)
       at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      


      This is Messaging SVN trunk.

      I don't know if this contradicts the spec, but I seem to recall it working on JBossMQ.