You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Snaith, Douglas" <do...@baesystems.com.INVALID> on 2022/08/02 15:05:37 UTC

Upgrade to Apache Camel 3 - no longer get logging / stacktrace

Hello

We are trying to upgrade our Spring / Camel Rest API application from Camel 2.16.2 to 3.7.3.

Since doing that, on route failure, we no longer get the Camel Message History, Exchange Logging and Stacktrace.

I've attached an example of what we used to get, but not now since upgrading.

This is one of the broken routes:

        <route errorHandlerRef="mfErrorHandler">
            <from uri="direct:downloadPackage" />
            <onException>
                <exception>java.lang.Exception</exception>
                <handled>
                    <constant>true</constant>
                </handled>
                <process ref="jobFeeInfoProcessor" />
<!--                <log message="MARINE FEE LOGGING: in MarineFees5 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
                <to uri="direct:generateReport" />
<!--                <log message="MARINE FEE LOGGING: in MarineFees6 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            </onException>
<!--            <log message="MARINE FEE LOGGING: in MarineFees7 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            <to uri="freemarker:templates/request/soap/package/createPackage.ftl?allowContextMapAll=true" />
<!--            <log message="MARINE FEE LOGGING: in MarineFees8 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            <to uri="cxf://bean:marineFeesPackageEndpoint?"   />
<!--            <log message="MARINE FEE LOGGING: in MarineFees9 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
           <!-- Remove IMPORTANT XML from CData -->
            <process ref="characterDataProcessor" />
            <!-- Marshal XML to Java Objects -->
<!--            <log message="MARINE FEE LOGGING: in MarineFees10 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            <process ref="feeReportUnmarshaller" />
<!--            <log message="MARINE FEE LOGGING: in MarineFees11 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
        </route>


Any suggestions for a fix?

Cheers,
Doug Snaith.



__________________________
Doug Snaith
Senior Software Engineer
Applied Intelligence
Leeds Valley Business Park

Douglas.snaith@baesystems.com<ma...@baesystems.com>
07984 867940
0330 158 0801

=================================
Advance Notice of Annual Leave
Monday 8th August
Wednesday 10th August - Friday 12th August
Thursday 18th August - Friday 26th August

BAE Systems will collect and process information about you that may be subject to data protection laws. For more information about how we use and disclose your personal information, how we protect your information, our legal basis to use your information, your rights and who you can contact, please refer to the relevant sections of our Privacy note at www.baesystems.com/en/cybersecurity/privacy <http://www.baesystems.com/en/cybersecurity/privacy>

Please consider the environment before printing this email. This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory. The contents of this email may relate to dealings with other companies under the control of BAE Systems PLC, details of which can be found at http://www.baesystems.com/Businesses/index.htm.

RE: Upgrade to Apache Camel 3 - no longer get logging / stacktrace

Posted by "Mattern, Alex" <al...@bbh.com.INVALID>.
Doug Snaith,

Message History is disabled by default in Camel 3. Override the default on your camelcontext or route.
https://camel.apache.org/components/3.14.x/eips/message-history.html


Alex Mattern | AVP | Infomediary Architect | Investor Services

[cid:image001.gif@01D8A665.13516A00]BROWN BROTHERS HARRIMAN
50 Post Office Square, Boston, MA 02110
alex.mattern@bbh.com<ma...@bbh.com>
www.bbh.com<http://www.bbh.com/>

From: Snaith, Douglas <do...@baesystems.com.INVALID>
Sent: Tuesday, August 2, 2022 11:06 AM
To: users@camel.apache.org
Subject: [EXTERNAL SENDER:] Upgrade to Apache Camel 3 - no longer get logging / stacktrace

Hello

We are trying to upgrade our Spring / Camel Rest API application from Camel 2.16.2 to 3.7.3.

Since doing that, on route failure, we no longer get the Camel Message History, Exchange Logging and Stacktrace.

I've attached an example of what we used to get, but not now since upgrading.

This is one of the broken routes:

        <route errorHandlerRef="mfErrorHandler">
            <from uri="direct:downloadPackage" />
            <onException>
                <exception>java.lang.Exception</exception>
                <handled>
                    <constant>true</constant>
                </handled>
                <process ref="jobFeeInfoProcessor" />
<!--                <log message="MARINE FEE LOGGING: in MarineFees5 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
                <to uri="direct:generateReport" />
<!--                <log message="MARINE FEE LOGGING: in MarineFees6 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            </onException>
<!--            <log message="MARINE FEE LOGGING: in MarineFees7 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            <to uri="freemarker:templates/request/soap/package/createPackage.ftl?allowContextMapAll=true" />
<!--            <log message="MARINE FEE LOGGING: in MarineFees8 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            <to uri="cxf://bean:marineFeesPackageEndpoint?"   />
<!--            <log message="MARINE FEE LOGGING: in MarineFees9 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
           <!-- Remove IMPORTANT XML from CData -->
            <process ref="characterDataProcessor" />
            <!-- Marshal XML to Java Objects -->
<!--            <log message="MARINE FEE LOGGING: in MarineFees10 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            <process ref="feeReportUnmarshaller" />
<!--            <log message="MARINE FEE LOGGING: in MarineFees11 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
        </route>


Any suggestions for a fix?

Cheers,
Doug Snaith.



__________________________
Doug Snaith
Senior Software Engineer
Applied Intelligence
Leeds Valley Business Park

Douglas.snaith@baesystems.com<ma...@baesystems.com>
07984 867940
0330 158 0801

=================================
Advance Notice of Annual Leave
Monday 8th August
Wednesday 10th August - Friday 12th August
Thursday 18th August - Friday 26th August


BAE Systems will collect and process information about you that may be subject to data protection laws. For more information about how we use and disclose your personal information, how we protect your information, our legal basis to use your information, your rights and who you can contact, please refer to the relevant sections of our Privacy note at www.baesystems.com/en/cybersecurity/privacy<https://urldefense.com/v3/__http:/www.baesystems.com/en/cybersecurity/privacy__;!!KV6Wb-o!9DPma9uDUILCq3tGeV4V9Iz8_GV9eTPCZMFl5T3OsMWOR_XXMS--Gd24H6KfcP-jh3X3GyMlP8TSnIshUW40MdTTWvX2sgZ-REg$>

Please consider the environment before printing this email. This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory. The contents of this email may relate to dealings with other companies under the control of BAE Systems PLC, details of which can be found at http://www.baesystems.com/Businesses/index.htm<https://urldefense.com/v3/__http:/www.baesystems.com/Businesses/index.htm__;!!KV6Wb-o!9DPma9uDUILCq3tGeV4V9Iz8_GV9eTPCZMFl5T3OsMWOR_XXMS--Gd24H6KfcP-jh3X3GyMlP8TSnIshUW40MdTTWvX2wsd-WQs$>.

*************************** IMPORTANT NOTE*****************************
The opinions expressed in this message and/or any attachments are those of the author and not necessarily those of Brown Brothers Harriman & Co., its subsidiaries and affiliates ("BBH"). There is no guarantee that this message is either private or confidential, and it may have been altered by unauthorized sources without your or our knowledge. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice. BBH accepts no responsibility for loss or damage from its use, including damage from virus.
******************************************************************************

Re: FW: Upgrade to Apache Camel 3 - no longer get logging / stacktrace

Posted by Claus Ibsen <cl...@gmail.com>.
For CXF you need to turn on stacktraces if you want to expose that.
https://cxf.apache.org/docs/debugging-and-logging.html

See also (search for stacktrace)
https://camel.apache.org/components/3.18.x/cxf-component.html


On Wed, Aug 3, 2022 at 6:48 PM Snaith, Douglas
<do...@baesystems.com.invalid> wrote:

> I’ve had a couple of suggestions which either haven’t worked or don’t seem
> applicable.
>
>
>
> My specific problem is a camel route that calls a SOAP endpoint, using
> cxf. We used to get a stacktrace and exchange messages when the call
> failed, but no longer. We need those in case the soap endpoint goes down
> and we need to diagnose.
>
>
>
> One suggestion was in the area of camel cxf migration, but this is going
> from camel 3.17 to 3.18 and we are only going to 3.7.x
>
>
>
> I’ve tried a ton of other things here, based on other suggestions, and
> reading around camel error/exception handling, and nothing has worked.
>
>
>
> I’m stuck.
>
>
>
> Any suggestions from out there in Camel World?
>
>
>
> Cheers
>
> Doug Snaith.
>
>
>
> *From:* Snaith, Douglas (UK Leeds)
> *Sent:* 02 August 2022 16:06
> *To:* users@camel.apache.org
> *Subject:* Upgrade to Apache Camel 3 - no longer get logging / stacktrace
>
>
>
> Hello
>
>
>
> We are trying to upgrade our Spring / Camel Rest API application from
> Camel 2.16.2 to 3.7.3.
>
>
>
> Since doing that, on route failure, we no longer get the Camel Message
> History, Exchange Logging and Stacktrace.
>
>
>
> I’ve attached an example of what we used to get, but not now since
> upgrading.
>
>
>
> This is one of the broken routes:
>
>
>
>         <route errorHandlerRef="mfErrorHandler">
>
>             <from uri="direct:downloadPackage" />
>
>             <onException>
>
>                 <exception>java.lang.Exception</exception>
>
>                 <handled>
>
>                     <constant>true</constant>
>
>                 </handled>
>
>                 <process ref="jobFeeInfoProcessor" />
>
> <!--                <log message="MARINE FEE LOGGING: in MarineFees5
> ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
>
>                 <to uri="direct:generateReport" />
>
> <!--                <log message="MARINE FEE LOGGING: in MarineFees6
> ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
>
>             </onException>
>
> <!--            <log message="MARINE FEE LOGGING: in MarineFees7 ${body}"
> loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
>
>             <to
> uri="freemarker:templates/request/soap/package/createPackage.ftl?allowContextMapAll=true"
> />
>
> <!--            <log message="MARINE FEE LOGGING: in MarineFees8 ${body}"
> loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
>
>             <to uri="cxf://bean:marineFeesPackageEndpoint?"   />
>
> <!--            <log message="MARINE FEE LOGGING: in MarineFees9 ${body}"
> loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
>
>            <!-- Remove IMPORTANT XML from CData -->
>
>             <process ref="characterDataProcessor" />
>
>             <!-- Marshal XML to Java Objects -->
>
> <!--            <log message="MARINE FEE LOGGING: in MarineFees10 ${body}"
> loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
>
>             <process ref="feeReportUnmarshaller" />
>
> <!--            <log message="MARINE FEE LOGGING: in MarineFees11 ${body}"
> loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
>
>         </route>
>
>
>
>
>
> Any suggestions for a fix?
>
>
>
> Cheers,
>
> Doug Snaith.
>
>
>
>
>
>
>
> *__________________________*
>
> *Doug Snaith*
>
> *Senior Software Engineer*
>
> *Applied Intelligence*
>
> *Leeds Valley Business Park*
>
>
>
> Douglas.snaith@baesystems.com
>
> 07984 867940
>
> 0330 158 0801
>
>
>
> *=================================*
>
> *Advance Notice of Annual Leave*
>
> *Monday 8th August*
>
> *Wednesday 10th August – Friday 12th August*
>
> *Thursday 18th August – Friday 26th August*
>
>
>
> BAE Systems will collect and process information about you that may be
> subject to data protection laws. For more information about how we use and
> disclose your personal information, how we protect your information, our
> legal basis to use your information, your rights and who you can contact,
> please refer to the relevant sections of our Privacy note at
> www.baesystems.com/en/cybersecurity/privacy
>
>
> Please consider the environment before printing this email. This message
> should be regarded as confidential. If you have received this email in
> error please notify the sender and destroy it immediately. Statements of
> intent shall only become binding when confirmed in hard copy by an
> authorised signatory. The contents of this email may relate to dealings
> with other companies under the control of BAE Systems PLC, details of which
> can be found at http://www.baesystems.com/Businesses/index.htm.
>


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

FW: Upgrade to Apache Camel 3 - no longer get logging / stacktrace

Posted by "Snaith, Douglas" <do...@baesystems.com.INVALID>.
I've had a couple of suggestions which either haven't worked or don't seem applicable.

My specific problem is a camel route that calls a SOAP endpoint, using cxf. We used to get a stacktrace and exchange messages when the call failed, but no longer. We need those in case the soap endpoint goes down and we need to diagnose.

One suggestion was in the area of camel cxf migration, but this is going from camel 3.17 to 3.18 and we are only going to 3.7.x

I've tried a ton of other things here, based on other suggestions, and reading around camel error/exception handling, and nothing has worked.

I'm stuck.

Any suggestions from out there in Camel World?

Cheers
Doug Snaith.

From: Snaith, Douglas (UK Leeds)
Sent: 02 August 2022 16:06
To: users@camel.apache.org
Subject: Upgrade to Apache Camel 3 - no longer get logging / stacktrace

Hello

We are trying to upgrade our Spring / Camel Rest API application from Camel 2.16.2 to 3.7.3.

Since doing that, on route failure, we no longer get the Camel Message History, Exchange Logging and Stacktrace.

I've attached an example of what we used to get, but not now since upgrading.

This is one of the broken routes:

        <route errorHandlerRef="mfErrorHandler">
            <from uri="direct:downloadPackage" />
            <onException>
                <exception>java.lang.Exception</exception>
                <handled>
                    <constant>true</constant>
                </handled>
                <process ref="jobFeeInfoProcessor" />
<!--                <log message="MARINE FEE LOGGING: in MarineFees5 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
                <to uri="direct:generateReport" />
<!--                <log message="MARINE FEE LOGGING: in MarineFees6 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            </onException>
<!--            <log message="MARINE FEE LOGGING: in MarineFees7 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            <to uri="freemarker:templates/request/soap/package/createPackage.ftl?allowContextMapAll=true" />
<!--            <log message="MARINE FEE LOGGING: in MarineFees8 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            <to uri="cxf://bean:marineFeesPackageEndpoint?"   />
<!--            <log message="MARINE FEE LOGGING: in MarineFees9 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
           <!-- Remove IMPORTANT XML from CData -->
            <process ref="characterDataProcessor" />
            <!-- Marshal XML to Java Objects -->
<!--            <log message="MARINE FEE LOGGING: in MarineFees10 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
            <process ref="feeReportUnmarshaller" />
<!--            <log message="MARINE FEE LOGGING: in MarineFees11 ${body}" loggingLevel="INFO" logName="com.baesystems.ai.lr"/>-->
        </route>


Any suggestions for a fix?

Cheers,
Doug Snaith.



__________________________
Doug Snaith
Senior Software Engineer
Applied Intelligence
Leeds Valley Business Park

Douglas.snaith@baesystems.com<ma...@baesystems.com>
07984 867940
0330 158 0801

=================================
Advance Notice of Annual Leave
Monday 8th August
Wednesday 10th August - Friday 12th August
Thursday 18th August - Friday 26th August

BAE Systems will collect and process information about you that may be subject to data protection laws. For more information about how we use and disclose your personal information, how we protect your information, our legal basis to use your information, your rights and who you can contact, please refer to the relevant sections of our Privacy note at www.baesystems.com/en/cybersecurity/privacy <http://www.baesystems.com/en/cybersecurity/privacy>

Please consider the environment before printing this email. This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory. The contents of this email may relate to dealings with other companies under the control of BAE Systems PLC, details of which can be found at http://www.baesystems.com/Businesses/index.htm.