This is the error I get when I run Tomcat Windows Service with Java Options –XX:MaxPermSize128m :
[2012-12-09 18:30:55] [395 javajni.c] [error] CreateJavaVM Failed
[2012-12-09 18:30:55] [1000 prunsrv.c] [error] Failed initializing java C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\bootstrap.jar
[2012-12-09 18:30:55] [1269 prunsrv.c] [error] ServiceStart returned 2
Wherein, if the MaxPermSize is not set, Tomcat boots properly.
You have to change the values in the
CATALINA_OPTSoption defined in the Tomcat Catalina start file. To increase the PermGen memory change the value of the MaxPermSize variable, otherwise change the value of the Xmx variable. For the Tomcat installed with the WebRatio tool the CATALINA_OPTS option is already present and you only have to change the variables values. Otherwise you have to add the declaration at the top of the file.