You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raul Kripalani (JIRA)" <ji...@apache.org> on 2013/04/03 02:39:15 UTC
[jira] [Comment Edited] (CAMEL-6218) TransferExchage InOut ActiveMQ
Exception
[ https://issues.apache.org/jira/browse/CAMEL-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13620449#comment-13620449 ]
Raul Kripalani edited comment on CAMEL-6218 at 4/3/13 12:39 AM:
----------------------------------------------------------------
Resolved in r1463799.
The JmsBinding is designed to be "pull-based", but the Exchange <=> OUT Message relationship was being set too late: after invoking the JmsBinding. Therefore, the latter wasn't able to populate body, headers and properties from the DefaultExchangeHolder in time.
As a side-effect, we now also set the OUT message when the {{transferException}} option is enabled (aside from also setting the Exception, of course). Before we only used to set the exception, but it's a chicken-or-egg situation to be honest.
This is harmless – and even better than before if you ask me, because now there's more context information in the Exchange. All JMS tests pass locally.
was (Author: raulvk):
Resolved in r1463799.
The JmsBinding is designed to be "pull-based", but the Exchange <=> OUT Message relationship was being set too late: after invoking the JmsBinding. Therefore, the latter wasn't able to populate body, headers and properties from the DefaultExchangeHolder in time.
As a side-effect, we now also set the OUT message when the {{transferException}} option is enabled (aside from also setting the Exception, of course). Before we only used to set the exception, but it's a chicken-or-egg situation to be honest.
This is harmless – and even better than before if you ask me – because now there's more context information in the Exchange. All JMS tests pass locally.
> TransferExchage InOut ActiveMQ Exception
> ----------------------------------------
>
> Key: CAMEL-6218
> URL: https://issues.apache.org/jira/browse/CAMEL-6218
> Project: Camel
> Issue Type: Bug
> Affects Versions: 2.10.4
> Reporter: Alan Foster
> Assignee: Raul Kripalani
> Fix For: 2.11.0
>
> Attachments: camel-6214-transferExchange.java, camel-6218-test-project.rar, org.apache.cmueller.camel.zip
>
>
> The scnearios are :
> - when using the transferExchange option only on the producer, I don't get the body back, but not the header.
> - When I use the transferExchange option on both producer and consumer, I get the headers back, but not the body. And instead I get the following exception
> {code:java}
> [ryQueueReplyManager[temporary]] TemporaryQueueReplyManager WARN Execution of JMS message listener failed. Caused by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException
> at org.apache.camel.impl.DefaultExchangeHolder.unmarshal(DefaultExchangeHolder.java:107)
> at org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:128)
> at org.apache.camel.component.jms.JmsMessage.createBody(JmsMessage.java:214)
> at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:41)
> at org.apache.camel.component.jms.reply.ReplyManagerSupport.processReply(ReplyManagerSupport.java:136)
> at org.apache.camel.component.jms.reply.TemporaryQueueReplyHandler.onReply(TemporaryQueueReplyHandler.java:54)
> at org.apache.camel.component.jms.reply.TemporaryQueueReplyManager.handleReplyMessage(TemporaryQueueReplyManager.java:71)
> at org.apache.camel.component.jms.reply.ReplyManagerSupport.onMessage(ReplyManagerSupport.java:113)
> at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
> at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
> at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
> at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
> at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
> at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
> at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
> at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
> at java.lang.Thread.run(Thread.java:662)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira