javax.jms.JMSException: Failed to build body from bytes. 
---------------------------------------------------------

                 Key: OPENEJB-889
                 URL: https://issues.apache.org/jira/browse/OPENEJB-889
             Project: OpenEJB
          Issue Type: Bug
    Affects Versions: 3.0
            Reporter: Kevan Miller
             Fix For: 3.0.x


A Geronimo user ran into a problem receiving ObjectMessages. It looks like 
OpenEJB is not properly setting the ContextClassLoader when a message is 
delivered to an MDB.

In the user's case, the JMS connector is being deployed separately from the 
MDB. So, the connector classloader does not include jars included in the EAR 
deployment. When an ObjectMessage is delivered to the MDB, the connector 
classloader is the ContextClassLoader. It should be the MDB ClassLoader.

Here's the exception:

    [java] 13:20:00,099 WARN  [AppBrokerImpl] javax.jms.JMSException: Failed to 
build body from bytes. Reason: java.io.IOException: app.entity.QuartzJobIssued
    [java] 13:20:00,099 ERROR [TokenBrokerImpl] JMSException processing JMS 
message.
    [java] javax.jms.JMSException: Failed to build body from bytes. Reason: 
java.io.IOException: app.entity.QuartzJobIssued
    [java]     at 
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:33)
    [java]     at 
org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:172)
    [java]     at 
app.messaging.TokenBrokerImpl.onMessage(TokenBrokerImpl.java:105)
    [java]     at app.jms.AppThreadListener.onMessage(AppThreadListener.java:35)
    [java]     at 
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
    [java]     at 
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:104)
    [java]     at 
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:171)
    [java]     at 
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:120)
    [java]     at 
org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
    [java]     at 
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:47)
    [java]     at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
    [java]     at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
    [java]     at java.lang.Thread.run(Thread.java:619)
    [java] Caused by: java.io.IOException: app.entity.QuartzJobIssued
    [java]     at 
org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:168)
    [java]     ... 11 more


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to