servicemix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gert Vanthienen (JIRA)" <>
Subject [jira] Updated: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.
Date Mon, 09 Nov 2009 11:16:52 GMT


Gert Vanthienen updated SMXCOMP-638:


Using the patches provided will convert all exceptions into a JBI-specific exception type
-- up to now, we just conveyed these back in the original type (as shown in the first test
in the attached JbiCamelExceptionsTest), allowing us to handle it in a Camel route (as shown
in the second test).

Considering that all exceptions implement the Serializable interface so they're supposed to
be serializable, I would suggest we keep this behavior as the default as I think a lot of
people are relying on this when they are using Camel for defining exception handling inside

However, to handle this scenario with non-serializable exceptions and properties, I would
like to suggest we add two optional flags to the endpoint:
- *{{convertExceptions}}* to convert all exceptions in a JB-specific exception type, so people
can use this to handle non-serializable exceptions
- *{{serialization=strict}}* to perform a strict serialiation check (by attempting the write
to a byte array output stream as suggested earlier by Giovani


> NotSerializableException with JMSFlow when camel returns an exception. 
> -----------------------------------------------------------------------
>                 Key: SMXCOMP-638
>                 URL:
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>    Affects Versions: servicemix-camel-2009.01
>            Reporter: Giovani Seben
>            Assignee: Gert Vanthienen
>         Attachments: fix.patch,, MOD_testcase.patch, SMXCOMP-638.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(

>         at org.apache.activemq.command.ActiveMQObjectMessage.setObject(

>         at org.apache.activemq.ActiveMQSession.createObjectMessage(

>         at org.apache.activemq.pool.PooledSession.createObjectMessage(

>         at org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow.doRouting(

>         at org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow.doSend(

>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(

>         at org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(

>         at

>         at org.apache.servicemix.jbi.container.JBIContainer.sendExchange(

>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(

>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(

>         at org.apache.servicemix.common.EndpointDeliveryChannel.send(

>         at org.apache.servicemix.common.endpoints.SimpleEndpoint.send(

>         at

>         at org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(

>         at org.apache.servicemix.camel.CamelProviderEndpoint.process(

>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(

>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(

>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(

>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(

>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(

>         at org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow.access$401(

>         at org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow$

>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(

>         at java.util.concurrent.ThreadPoolExecutor$

>         at 
> Caused by: org.apache.servicemix.camel.JbiExchange

>         at 
>         at

>         at 
>         at

>         at 
>         at 
>         at java.util.HashMap.writeObject( 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>         at sun.reflect.NativeMethodAccessorImpl.invoke(

>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(

>         at java.lang.reflect.Method.invoke( 
>         at 
>         at 
>         at

>         at 
>         at 
>         at org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(

>         at org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(

>         at

>         at

>         at 
>         at 
>         at org.apache.activemq.command.ActiveMQObjectMessage.storeContent(
> {code}

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

View raw message