1 Reply Latest reply on Aug 26, 2001 1:45 AM by Hiram Chirino

    MDB - ClassNotFoundException on getObject()

    Vincent Harcq Newbie

      Hi,

      I have an ejb jar with one session bean dans one mdb.
      I send a Message to a Queue from the session bean using an ObjectMessage.
      The mdb receive the message but when I try to getObject() on it, I got:

      javax.jms.MessageFormatException: ClassNotFoundException
       at org.jboss.mq.SpyObjectMessage.getObject(SpyObjectMessage.java:78)
       ...
      

      I am wondering how can this happen if my sb and mdb are in the same jar, this jar containing the Serializable class I send to my queue.

      If I debug the CNFE, I have :
      java.lang.ClassNotFoundException: com.hm.base.detail.GeneralDetail
       at javax.management.loading.MLet.findClass(MLet.java:800)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:195)
       at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654)
       at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
       at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
       at org.jboss.mq.SpyObjectMessage.getObject(SpyObjectMessage.java:72)
      

      This last line being:
      retVal = ( Serializable )input.readObject();


      What is strange for me is the reference to the MLet, is it not the EJB JAR classloader that should find the class ?

      It HAS worked before, this problem arises after JBossMQ 1.0.0 beta release.

      Please help.
      Vincent.