[ 
https://issues.apache.org/activemq/browse/SMXCOMP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gert Vanthienen resolved SMXCOMP-638.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: servicemix-camel-2009.02
                   3.2.4

The fix has been applied in 
http://svn.apache.org/viewvc?view=revision&revision=835955 for components' trunk
and was backported to the ServiceMix 3.2.x branch in 
http://svn.apache.org/viewvc?view=revision&revision=835959

Thanks to Willem and Giovani for providing the patches and constructive 
suggestions!

The component now supports two more options as previously described in the 
comments.  Documentation has been added to 
http://cwiki.apache.org/confluence/display/CAMEL/JBI

> NotSerializableException with JMSFlow when camel returns an exception. 
> -----------------------------------------------------------------------
>
>                 Key: SMXCOMP-638
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-638
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>    Affects Versions: servicemix-camel-2009.01
>            Reporter: Giovani Seben
>            Assignee: Gert Vanthienen
>             Fix For: 3.2.4, servicemix-camel-2009.02
>
>         Attachments: fix.patch, JbiCamelExceptionsTest.java, 
> MOD_testcase.patch, smxcomp-638-new.patch, SMXCOMP-638.patch, smxcomp638.patch
>
>
> In servicemix when a camel route handles an exception that is then returned 
> to the NMR it will attempt to return the exception object with the exchange. 
> Using JMSFlow if the exception object is not serializable, it will fail to be 
> sent back with a NotSerializableException. This is similar to SMXCOMP-18, but 
> instead the problem here happens with the  CamelProviderEndpoint.
> Below is the full exception stack trace:
> {code}
> java.lang.RuntimeException: org.apache.servicemix.camel.JbiExchange 
>         at 
> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:104)
>  
>         at 
> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:155)
>  
>         at 
> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:319)
>  
>         at 
> org.apache.activemq.pool.PooledSession.createObjectMessage(PooledSession.java:149)
>  
>         at 
> org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow.doRouting(AbstractJMSFlow.java:480)
>  
>         at 
> org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow.doSend(AbstractJMSFlow.java:435)
>  
>         at 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:126) 
>         at 
> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:283)
>  
>         at 
> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:88)
>  
>         at 
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:882)
>  
>         at 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:396)
>  
>         at 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:432)
>  
>         at 
> org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:79)
>  
>         at 
> org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:70)
>  
>         at 
> org.apache.servicemix.common.endpoints.SimpleEndpoint.fail(SimpleEndpoint.java:94)
>  
>         at 
> org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:128)
>  
>         at 
> org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:73)
>  
>         at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:540)
>  
>         at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:492)
>  
>         at 
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>  
>         at 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
>  
>         at 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:183)
>  
>         at 
> org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow.access$401(AbstractJMSFlow.java:63)
>  
>         at 
> org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow$4.run(AbstractJMSFlow.java:517)
>  
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>  
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>  
>         at java.lang.Thread.run(Thread.java:595) 
> Caused by: java.io.NotSerializableException: 
> org.apache.servicemix.camel.JbiExchange 
>         at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081) 
>         at 
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375) 
>         at 
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347) 
>         at 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) 
>         at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079) 
>         at 
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) 
>         at java.util.HashMap.writeObject(HashMap.java:1039) 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  
>         at java.lang.reflect.Method.invoke(Method.java:585) 
>         at 
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917) 
>         at 
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339) 
>         at 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) 
>         at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079) 
>         at 
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) 
>         at 
> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:404)
>  
>         at 
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:605)
>  
>         at 
> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310) 
>         at 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288) 
>         at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079) 
>         at 
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) 
>         at 
> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
> {code}

-- 
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