I solved this problem by putting transmitting class (Event) into orion's lib directory. It's not clear solution, but it works.
I realized that bean's classloader knows the where the class Event is, but message's classloader knows only path to orion's lib.
----- Original Message -----
Sent: Monday, March 04, 2002 9:43 AM
Subject: javax.jms.MessageFormatException when ObjectMessage.getObject()

I'm sending message via topic:
      ObjectMessage message = session.createObjectMessage(new Event());
      session.createPublisher(topic).publish(message, deliveryMode, priority, expiration);
When I catch the message in my MDB, I get exception in getObject():
      public void onMessage(Message msg) {
1.            Thread.currentThread().getContextClassLoader().loadClass("com.cleverlance.cmds.comm.Event");
2.            ((ObjectMessage)msg).getObject();
Class Event is in classpath and is visible for classloader (line 1 is ok). When running line 2, I get javax.jms.MessageFormatException: com.cleverlance.cmds.comm.Event
Class Event is very simple:
      package com.cleverlance.cmds.comm;
      public class Event implements java.io.Serializable {
            public Event();
Do you know what's wrong? Thanks.

Reply via email to