1 Reply Latest reply on May 8, 2008 11:28 AM by clebert.suconic

    Unable to deserialize objects inside onmessage() method: cla

    msrednsi

      Hello

      This is muy first ear app and i have a weird problem.
      I have a EJB 3 packaged ear application (lib without explicic classpath on the manifest), with mdb, jpa, and a war module, i'm using jboss messaging 1.4.0.sp3.

      On the war module I subscribe to listen on a topic in asyncronous mode so when the onmessage() method is called, it's running on the jboss selected receiver thread.

      The problem is that a get a classnotfound expeption in the onmessage() method when deserializing an object that is on the classpath, i'm sure of that because i can do a classForName() using the thread's class loader on other part of de code that is executed in the main web thread, the one that configures and starts the topic connection.
      The problem is that the receiving thread who executes the onmessage() method has another context classloader, it's domain is jboss-messaging.sar not my ear application.

      It seems that the receiver thread is using its own class loader and that this class loader has nothing to do with my app. It doesn't sound logical to me. Any ideas?



      Thanks in advance
      Manuel Sánchez