[jira] Created: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

View: New views
16 Messages — Rating Filter:   Alert me  

[jira] Created: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


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.


[jira] Updated: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Giovani Seben updated SMXCOMP-638:
----------------------------------

    Patch Info: [Patch Available]

> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Updated: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Giovani Seben updated SMXCOMP-638:
----------------------------------

    Attachment: MOD_testcase.patch
                fix.patch

Attaching two files.
MOD_testcase.patch modifies the JbiInOutCamelErrorHandlingTest to reproduce this issue and to use JMSFlow. This is meant to demonstrate the problem only, it's not ready to be commited since it disables other tests in the class and forces all others to use JmsFlow.

fix.patch is my suggested solution to the NotSerializableException problem. It adds a serializable test when copying a camel exchange to a jbi one and improves the isSerializable test.

> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Assigned: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Gert Vanthienen reassigned SMXCOMP-638:
---------------------------------------

    Assignee: Gert Vanthienen

> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Commented: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SMXCOMP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54630#action_54630 ]

Gert Vanthienen commented on SMXCOMP-638:
-----------------------------------------

Giovani,

I don't think trying to write the object to a stream to check serializabilty is the right thing to do by default: it will introduce a fair amount of overhead and this will also convert or break any stream-based messages that are being handled (because the stream will have to be read from while writing to the ObjectOutputStream).  

I would like to look into the possibility of leveraging the fix for SMXCOMP-693 to also filter for non-serializable values, which would allow use to have two filter strategies: one with the naïve isSerializable() implementation we have today (which avoids breaking message streams) and one with the more sophisticated serialization check you have.  

Wdyt?

Gert

> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Commented: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SMXCOMP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54705#action_54705 ]

Giovani Seben commented on SMXCOMP-638:
---------------------------------------

Gert,

I see your point about the over head and the risk of breaking stream-based messages. I tried looking for SMXCOMP-693 but couldn't find it in Jira. The idea of using a strategy that takes advantage of both serializable tests sounds good to me though.

Thanks,
Giovani

> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Updated: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Giovani Seben updated SMXCOMP-638:
----------------------------------

    Attachment: smxcomp638.patch

Gert,

A simpler option would be to leave the serializable check unchanged and simply add an instanceof Exception test that does a get message on the exception.

This fix would work for me as well.

Thanks,
-Gio

> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Commented: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SMXCOMP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55137#action_55137 ]

Willem Jiang commented on SMXCOMP-638:
--------------------------------------

Hi Glovani,

I tried to apply your patch on the latest servicemix-camel component , and I found there some issue of your latest solution after running some test.

1. If the exception has no message,  you will get the NPE when you trying to put exception message into exchange.

2. If the camel processor throw the exception out , we will hit the NotSerializableException if the exception have some trouble to serialize.

So my suggestion is wrapping the exception with a  JBI exception to avoid the  NotSerializableException, and use the exception.toString() as the JBI exception message.

Any thought?

Willem



> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Commented: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SMXCOMP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55148#action_55148 ]

Giovani Seben commented on SMXCOMP-638:
---------------------------------------

Willem,

I'm ok with that. At what point would your wrap the exception with a JBI exception? When you are copying the camel exchange into a jbi exchange?

Thanks,
-Gio

> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Updated: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Willem Jiang updated SMXCOMP-638:
---------------------------------

    Attachment: SMXCOMP-638.patch

Attached patch SMXCOMP-638.path on the latest component trunk.

> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Commented: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SMXCOMP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55156#action_55156 ]

Willem Jiang commented on SMXCOMP-638:
--------------------------------------

@Giovani
If you take a look at the patch, you will find the exception is wrapped when the copy the camel exchange into a jbi exchange.

> 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
>         Attachments: fix.patch, MOD_testcase.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.


[jira] Updated: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Gert Vanthienen updated SMXCOMP-638:
------------------------------------

    Attachment: JbiCamelExceptionsTest.java

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

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

Wdyt?

> 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
>         Attachments: fix.patch, JbiCamelExceptionsTest.java, MOD_testcase.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.


[jira] Commented: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SMXCOMP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55226#action_55226 ]

Willem Jiang commented on SMXCOMP-638:
--------------------------------------

@Gertv
+1 for you suggestion, it gives us a better back ward compatibility.




> 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
>         Attachments: fix.patch, JbiCamelExceptionsTest.java, MOD_testcase.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.


[jira] Commented: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/SMXCOMP-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55244#action_55244 ]

Giovani Seben commented on SMXCOMP-638:
---------------------------------------

@Gertv,
I like your suggestion too, specially the serialization=strict, since there could be non-serializable objects aside from exceptions that are sent over the bus.

-Gio

> 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
>         Attachments: fix.patch, JbiCamelExceptionsTest.java, MOD_testcase.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.


[jira] Updated: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Willem Jiang updated SMXCOMP-638:
---------------------------------

    Attachment: smxcomp-638-new.patch

A new patch (smxcomp-638-new.patch) which introduced two boolean options to jbi endpoint.
convertExceptions and strictSerialization.
This patch also contains the JbiCamelExceptionsTest.java.


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


[jira] Resolved: (SMXCOMP-638) NotSerializableException with JMSFlow when camel returns an exception.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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