0
votes

I'm trying to enable SecurityManager in Tomcat 6.0.43 using this doc: https://tomcat.apache.org/tomcat-6.0-doc/security-manager-howto.html

When I start Tomcat with "-security" option, I get the following error in catalina.out:

Unrecognized option: -security
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I tried to use OpenJDK JRE 1.7 and Oracle JRE 1.7. In both cases I've got the same error.

Am I missing something?

UPDATE

The command I'm using is:

export JRE_HOME=/opt/jre
export CATALINA_OPTS="-XX:MaxPermSize=128m -Xbootclasspath/a:"/opt/apache-tomcat/lib/*"-Dcatalina.home="/opt/apache-tomcat" -Dlog4j.configuration=file:"/opt/apache-tomcat/lib/log4j.properties" -Xms256m -Xmx256m -security"
catalina.sh start
1
Can you show the actual command you're using?vphilipnyc
you are passing it to jvm, instead of argument to Catlaina scriptjmj
bphilipnyc, I added the command I'm using to the main message.Alex
Jigar Joshi, I'm passing "-security" to catalina.sh script (please look at message update). Is it incorrect?Alex

1 Answers

1
votes

You can't use -security in CATALINA_OPTS. It has to be a parameter passed-into the script on the command-line, like this:

$ export CATALINA_OPTS="-XX:MaxPermSize:128 [...]"
$ $CATALINA_HOME/bin/catalina.sh -security start