You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Leber, Thomas" <th...@omnetric.com> on 2018/01/15 09:34:09 UTC

Camel JMS transferExchange=true Exception

Hi,

I'm sending in an onException clause the exchange to another camel route via JMS.
In order to handle the error, the idea was to use transferExchange=true, since the documentations states the exchange exception is transferred as well.

Unfortunately I get this error in the JMS listener:
--------------------------------------------------------------------------------------------------------
Execution of JMS message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - Failed to extract body due to: javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class org.apache.camel.impl.DefaultExchangeHolder! This class is not trusted to be serialized as ObjectMessage payload. Please take a look at http://activemq.apache.org/objectmessage.html for more information on how to configure trusted classes..
--------------------------------------------------------------------------------------------------------

I found out that there is a way to configure the security settings on the AMQ, but I was surprised that this is not mentioned somewhere.
Did anybody else encounter this problem?

Camel 2.17.0
AMQ 5.11.0

Regards,
Thomas Leber

Re: AW: Camel JMS transferExchange=true Exception

Posted by Andrea Cosentino <an...@yahoo.com.INVALID>.
The official documentation now is in the Camel repo. As you may see from the link posted by Claus

https://github.com/apache/camel/blob/master/components/camel-jms/src/main/docs/jms-component.adoc

We are in the process of migrating the whole documentation in .adoc and the site is no longer aligned, we are working on a new site.


--
Andrea Cosentino 
----------------------------------
Apache Camel PMC Member
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1985@yahoo.com
Twitter: @oscerd2
Github: oscerd






On Monday, January 15, 2018, 1:54:26 PM GMT+1, Leber, Thomas <th...@omnetric.com> wrote: 





Hi Claus,

Ok thanks for this. I'll try to append whatever I found to the documentation.

One thing,  since some time I encounter some rendering problems of snippets on the camel homepage.
Is this a known problem?

Best,
Thomas


-----Ursprüngliche Nachricht-----
Von: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Gesendet: Montag, 15. Jänner 2018 10:56
An: users@camel.apache.org
Betreff: Re: Camel JMS transferExchange=true Exception

Hi

Its an Apache ActiveMQ setting (not Camel specific) that do not allow java serialized objects by default, and you need to configure it with the approved classes/packages.

If you want to help improve the docs at Apache Camel, then you can submit a PR with doc updates on this file https://github.com/apache/camel/blob/master/components/camel-jms/src/main/docs/jms-component.adoc

And how to contribute to Camel is here
http://camel.apache.org/contributing

On Mon, Jan 15, 2018 at 10:34 AM, Leber, Thomas <th...@omnetric.com> wrote:
> Hi,
>
> I'm sending in an onException clause the exchange to another camel route via JMS.
> In order to handle the error, the idea was to use transferExchange=true, since the documentations states the exchange exception is transferred as well.
>
> Unfortunately I get this error in the JMS listener:
> ----------------------------------------------------------------------
> ----------------------------------
> Execution of JMS message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - Failed to extract body due to: javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class org.apache.camel.impl.DefaultExchangeHolder! This class is not trusted to be serialized as ObjectMessage payload. Please take a look at http://activemq.apache.org/objectmessage.html for more information on how to configure trusted classes..
> ----------------------------------------------------------------------
> ----------------------------------
>
> I found out that there is a way to configure the security settings on the AMQ, but I was surprised that this is not mentioned somewhere.
> Did anybody else encounter this problem?
>
> Camel 2.17.0
> AMQ 5.11.0
>
> Regards,
> Thomas Leber



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

AW: Camel JMS transferExchange=true Exception

Posted by "Leber, Thomas" <th...@omnetric.com>.
Hi Claus,

Ok thanks for this. I'll try to append whatever I found to the documentation.

One thing,  since some time I encounter some rendering problems of snippets on the camel homepage.
Is this a known problem?

Best,
Thomas


-----Ursprüngliche Nachricht-----
Von: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Gesendet: Montag, 15. Jänner 2018 10:56
An: users@camel.apache.org
Betreff: Re: Camel JMS transferExchange=true Exception

Hi

Its an Apache ActiveMQ setting (not Camel specific) that do not allow java serialized objects by default, and you need to configure it with the approved classes/packages.

If you want to help improve the docs at Apache Camel, then you can submit a PR with doc updates on this file https://github.com/apache/camel/blob/master/components/camel-jms/src/main/docs/jms-component.adoc

And how to contribute to Camel is here
http://camel.apache.org/contributing

On Mon, Jan 15, 2018 at 10:34 AM, Leber, Thomas <th...@omnetric.com> wrote:
> Hi,
>
> I'm sending in an onException clause the exchange to another camel route via JMS.
> In order to handle the error, the idea was to use transferExchange=true, since the documentations states the exchange exception is transferred as well.
>
> Unfortunately I get this error in the JMS listener:
> ----------------------------------------------------------------------
> ----------------------------------
> Execution of JMS message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - Failed to extract body due to: javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class org.apache.camel.impl.DefaultExchangeHolder! This class is not trusted to be serialized as ObjectMessage payload. Please take a look at http://activemq.apache.org/objectmessage.html for more information on how to configure trusted classes..
> ----------------------------------------------------------------------
> ----------------------------------
>
> I found out that there is a way to configure the security settings on the AMQ, but I was surprised that this is not mentioned somewhere.
> Did anybody else encounter this problem?
>
> Camel 2.17.0
> AMQ 5.11.0
>
> Regards,
> Thomas Leber



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Camel JMS transferExchange=true Exception

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Its an Apache ActiveMQ setting (not Camel specific) that do not allow
java serialized objects by default, and you need to configure it with
the approved classes/packages.

If you want to help improve the docs at Apache Camel, then you can
submit a PR with doc updates on this file
https://github.com/apache/camel/blob/master/components/camel-jms/src/main/docs/jms-component.adoc

And how to contribute to Camel is here
http://camel.apache.org/contributing

On Mon, Jan 15, 2018 at 10:34 AM, Leber, Thomas
<th...@omnetric.com> wrote:
> Hi,
>
> I'm sending in an onException clause the exchange to another camel route via JMS.
> In order to handle the error, the idea was to use transferExchange=true, since the documentations states the exchange exception is transferred as well.
>
> Unfortunately I get this error in the JMS listener:
> --------------------------------------------------------------------------------------------------------
> Execution of JMS message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - Failed to extract body due to: javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class org.apache.camel.impl.DefaultExchangeHolder! This class is not trusted to be serialized as ObjectMessage payload. Please take a look at http://activemq.apache.org/objectmessage.html for more information on how to configure trusted classes..
> --------------------------------------------------------------------------------------------------------
>
> I found out that there is a way to configure the security settings on the AMQ, but I was surprised that this is not mentioned somewhere.
> Did anybody else encounter this problem?
>
> Camel 2.17.0
> AMQ 5.11.0
>
> Regards,
> Thomas Leber



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2