Tomcat9 slow response with security manager in OpenJdk11

614 Views Asked by At

We added -Djava.security.manager parameter in java options of tomcat9 to enable security manager . Tomcat is running without any issue but when I try to perform some operation then it takes 9-10 min to process that(login, logout of deployed application or accessing one of the servlet directly) and also no error in log file. If I remove this parameter then there is no delay.

This issue is only visible with java11. Till Java 8 it works fine without any issue.

e.g. Security manager + tomcat9+ java 11= slowness in performing any operation

Security manager + tomcat9+ java 8= Working as expected

1

There are 1 best solutions below

0
rahul sharma On

Adding permission java.lang.RuntimePermission "accessSystemModules"; in catalina.policy solve the issue as it required defineClassInPackage.java.* permission. In java 8 it will work without giving accessSystemModule however, that's required in java 11