Troubleshooting

If your web application attempts to execute an operation that is prohibited by lack of a required Permission, it will throw an AccessControLException or a SecurityException when the SecurityManager detects the violation. Debugging the permission that is missing can be challenging, and one option is to turn on debug output of all security decisions that are made during execution. This is done by setting a system property before starting Tomcat. The easiest way to do this is via the CATALINA_OPTS environment variable. Execute this command:

export CATALINA_OPTS=-Djava.security.debug=all   (Unix)

set CATALINA_OPTS=-Djava.security.debug=all       (Windows)

 

before starting Tomcat.

This will generate many megabytes of output! However, it can help you track down problems by searching for the word “FAILED” and determining which permission was being checked for. See the Java security documentation for more options that you can specify here as well.

Share this post
[social_warfare]
Configuring Package Protection in Tomcat
JNDI Resources

Get industry recognized certification – Contact us

keyboard_arrow_up