Sunday 17 August 2014

Textual description of firstImageUrl

How to Print Full Stack Trace In Mule Flow

To print full exception stack trace in mule , you need to add a grrovy scripting element like this :
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
 xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd 
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
    
    <flow name="muleMavenSampleFlow1" doc:name="muleMavenSampleFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
        <catch-exception-strategy doc:name="Catch Exception Strategy">
         <scripting:transformer doc:name="Print StackTrace">
    <scripting:script engine="Groovy">
                    <scripting:text><![CDATA[org.apache.log4j.Logger.getLogger("").error("Error Trace is : \n",exception)]]></scripting:text>
    </scripting:script>
   </scripting:transformer>
        </catch-exception-strategy>
       
    </flow>
</mule>

Post Comments And Suggestions !!