Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6288

SwitchYard / Camel component Exception handling changed from 6.2.1 to 6.3

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-6.x-GA
    • jboss-fuse-6.3
    • SwitchYard
    • None
    • % %
    • Hide

      Please use the "camel-soap-proxy" quickstart and make these changes:
      1.) replace the file "route.xml" with the the one provided below
      2.) Build the changed quickstart. Deploy ONLY the switchyard-camel-soap-proxy deployable (in soap-proxy/target) so the external call will fail. We are interested in watching the exception.
      3) Invoke the SOAP proxy, note the result.
      4.) Do this with Fuse on EAP 6.2.1 and with Fuse 6.3

      We will find that 6.2.1 shows the 'doCatch' is invoked:

      org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging(PhaseInterceptorChain.java:377)^M
      2016-11-17 14:10:49.408
      RK3983nodeesb ERROR   camel-soap-proxy http-0.0.0.0:8080-1 EXCEPTION thrown: SWITCHYARD035429: Unexpected exception handling SOAP Message org.slf4j.helpers.MarkerIgnoringBase.error(MarkerIgnoringBase.java:145)^M
      2016-11-17 14:10:49.410
      RK3983nodeesb INFO   camel-soap-proxy http-0.0.0.0:8080-1 FINALLY BLOACK called! org.slf4j.helpers.MarkerIgnoringBase.info(MarkerIgnoringBase.java:96)^M

      while the 6.3 doCatch() is not invoked:

      org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging(PhaseInterceptorChain.java:377)^M
      2016-11-17 14:07:58.099
      RK3983nodeesb INFO   camel-soap-proxy http-0.0.0.0:8080-1 FINALLY BLOACK called! org.apache.camel.util.CamelLogger.log(CamelLogger.java:159)^M

      Use the following route.xml:
      -------------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>

      <routes xmlns="http://camel.apache.org/schema/spring">
      <route>
      <from uri="switchyard://ProxyService"/>

      <doTry id="_doTry1">
      <to uri="switchyard://ReverseService?operationName=reverse"/>

      <doCatch id="_doCatch1">
      <exception>java.lang.Exception</exception>
      <handled>
      <constant>false</constant>
      </handled>
      <log id="route-createpw-jms-request_log10"
      logName="camel-soap-proxy"
      loggingLevel="ERROR" message="EXCEPTION thrown: ${exception.message}"/>
      </doCatch>
      <doFinally id="_doFinally1">
      <log id="route-createpw-jms-request_log20"
      logName="camel-soap-proxy" message="FINALLY BLOACK called!"/>
      </doFinally>
      </doTry>
      </route>
      </routes>

      Show
      Please use the "camel-soap-proxy" quickstart and make these changes: 1.) replace the file "route.xml" with the the one provided below 2.) Build the changed quickstart. Deploy ONLY the switchyard-camel-soap-proxy deployable (in soap-proxy/target) so the external call will fail. We are interested in watching the exception. 3) Invoke the SOAP proxy, note the result. 4.) Do this with Fuse on EAP 6.2.1 and with Fuse 6.3 We will find that 6.2.1 shows the 'doCatch' is invoked: org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging(PhaseInterceptorChain.java:377)^M 2016-11-17 14:10:49.408 RK3983nodeesb ERROR   camel-soap-proxy http-0.0.0.0:8080-1 EXCEPTION thrown: SWITCHYARD035429: Unexpected exception handling SOAP Message org.slf4j.helpers.MarkerIgnoringBase.error(MarkerIgnoringBase.java:145)^M 2016-11-17 14:10:49.410 RK3983nodeesb INFO   camel-soap-proxy http-0.0.0.0:8080-1 FINALLY BLOACK called! org.slf4j.helpers.MarkerIgnoringBase.info(MarkerIgnoringBase.java:96)^M while the 6.3 doCatch() is not invoked: org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging(PhaseInterceptorChain.java:377)^M 2016-11-17 14:07:58.099 RK3983nodeesb INFO   camel-soap-proxy http-0.0.0.0:8080-1 FINALLY BLOACK called! org.apache.camel.util.CamelLogger.log(CamelLogger.java:159)^M Use the following route.xml: ------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <routes xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="switchyard://ProxyService"/> <doTry id="_doTry1"> <to uri="switchyard://ReverseService?operationName=reverse"/> <doCatch id="_doCatch1"> <exception>java.lang.Exception</exception> <handled> <constant>false</constant> </handled> <log id="route-createpw-jms-request_log10" logName="camel-soap-proxy" loggingLevel="ERROR" message="EXCEPTION thrown: ${exception.message}"/> </doCatch> <doFinally id="_doFinally1"> <log id="route-createpw-jms-request_log20" logName="camel-soap-proxy" message="FINALLY BLOACK called!"/> </doFinally> </doTry> </route> </routes>

    Description

      In Fuse 6.2.1, SwitchYard's Camel (XML) component would allow use of doTry/doCatch with expected behavior.

      The same application logic now behaves differently under Fuse 6.3. 'doCatch' does not behave as expected (and as previously exhibited).

      Attachments

        Issue Links

          Activity

            People

              toigaras@redhat.com tomohisa igarashi
              rhn-support-rick Rick Wagner
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: