How to make Mule 3 display full stack traces

I had an exception where I got this shorthand trace:

Root Exception stack trace: java.sql.SQLException: Invalid column name at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3677) at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:2749) at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:494) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) 

Then I put this in " log4j.properties " and it did not help:

 log4j.logger.org.mule=DEBUG 

I also failed with the second sentence (and I suspect that I am not doing it right):

 $ ./mule -Dmule.verbose.exceptions=true 
+4
source share
3 answers

As explained here , arguments are passed from the command line to Mule as follows:

 $ ./mule -M-Dmule.verbose.exceptions=true 

T. with the prefix -M .

+8
source

By default, Mule filters out some of the class’s internal references from stacktraces to get more readable output. You can follow this link for a proper understanding. https://docs.mulesoft.com/mule-user-guide/v/3.7/configuring-mule-stacktraces

+1
source

I know that the question is how to configure detailed exceptions in Mule Studio, but if you want to configure it directly on the Mule ESB server, you can add wrapper.java.additional.n entries to the shell . conf in the / conf directory in the Mule installation directory. This wrapper.conf file contains all the parameters sent to Mule during startup:

i.e. wrapper.java.additional.6=-Dmule.verbose.exceptions=true

Just make sure the index of the wrapper.java.additional parameter . not used for another.

To pass arguments to the command line by adding the -M switch.

i.e. MULE_HOME/bin/mule -M-Dmule.verbose.exceptions=true

To deploy Anypoint Studio:

Right-click on the root of the project in Studio, select "Run As" → "Run Configuration" → "Argument", add arguments to the VM arguments window,

 ie -XX:PermSize=128M -XX:MaxPermSize=256M -Dmule.verbose.exceptions=true 

To run Mule as a Maven application:

You can pass a command line argument as

 ie mvn package -Dmule.verbose.exceptions=true 

To deploy Cloudhub:

You can pass a command line argument by adding them as “Properties” in the “Deployment” → “Settings” → “Properties” section

0
source

All Articles