2. • Stack traces :
– In simple terms, a stack trace is a list of the method calls
that the application was in the middle of, when an
Exception was thrown.
– The stack traces contain the methods with the full class
name (Including the package) to which they belong to.
– The stack traces display how the call progressed through
multiple classes through their methods.
– This information is helpful to understand the cause of the
exception.
Managing Mule Stack Traces
3. • Stack traces in Mule:
– Mule being a java application the stack traces displayed
follow the same pattern.
– Mule allows to define the applications behavior.
– Mule Stack traces can be configured through some
parameters.
– As required the values of these parameters can be
updated/passed and accordingly the stack traces displayed
on exception, change.
Managing Mule Stack Traces
4. • Configuring Mule Stack Traces :
– By Default mule filters out some internal class references
from stack traces to produce a more readable output.
– This behavior can be controlled through configurations.
– Mule Stack Traces can be configures through :
• Command-line arguments.
• Setting properties in Mule Studio
• Using JMX
Managing Mule Stack Traces
5. • Command-Line Arguments:
– There are two command line properties through which the
behavior of the stack trace can be controlled :
– These properties need to be added in the below format :
• -M-DpropertyName
– The properties are :
• mule.stacktrace.full :
– When present, Mule does not filter stacktraces.
– Intended for Mule developers only, end users probably never need to enable
this.
– Note : the property ’mule.verbose.exceptions=true’ can also be used to
achieve the same result.
• mule.stacktrace.filter:
– A comma-separated list of packages and/or classes to remove from the
stacktraces
– These are matched via string.startsWith().
Managing Mule Stack Traces
6. • Setting Properties in Anypoint Studio:
– The same properties used in Command-Line can be
specified in Anypoint Studio to:
• instruct Mule to provide either unfiltered stacktraces or
• to configure a particular filter of packages or classes to remove.
– These properties can be configured through following
steps :
• open your mule-project.xml file
• define environment variables to specify the behavior you want.
• Example :
– Define the environment variable : ‘mule.stacktrace.full’ with value as ‘true’ to
enable unfiltered stack traces.
Managing Mule Stack Traces
7. • Configuring Stack Traces Using JMX:
• The configuration MBean now exposes two new
options for controlling the behavior of Stack Traces
• The properties are :
– FullStackTrace :
» When present, Mule does not filter stack traces.
– StackTraceFilter
» A comma-separated list of packages and/or classes to
remove from the stack traces.
• Note :
– Even though each app has its own configuration Mbean, these
settings are shared between the apps.
– Modifying them in one app affects other apps.
Managing Mule Stack Traces