• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Invalid initial heap size and can't run the tomcat

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi experts I have tried all pssible ways to change the wrong value in Xms as mentioned down but still not changed at all , I have tried to set java_opts in windows environment , I have tried to change in registry , I have tried to change in Apache tomcat properties but all are not changing the value and I can not run the tomcat at all . I am using tomcat 5 with manual installation. please help me

Invalid initial heap size: -Xms1024m -Xmx20246m -XX:NewSize=356m -XX:MaxNewSize=456m -XX:PermSize=356m -XX:MaxPermSize=456m
Could not create the Java virtual machine.
 
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

alsoumahi alBatal wrote:Invalid initial heap size: -Xms1024m -Xmx20246m -XX:NewSize=356m -XX:MaxNewSize=456m -XX:PermSize=356m -XX:MaxPermSize=456m
Could not create the Java virtual machine.


Probably you have given the -Xmx value too large and OS is not able to allocate that much memory for heap.
Please note that 20246m means more than 19gb.
Check your available RAM/virtual memory
 
alsoumahi alBatal
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Probably you have given the -Xmx value too large and OS is not able to allocate that much memory for heap.
Please note that 20246m means more than 19gb.
Check your available RAM/virtual memory



I know that it is too big , and I tried to change it but it is not going to change why!! , where is this value and how to change it ( in which file it is being regisetered of tomcat or java library )
please guide me in how to change it setp by step
 
Tapas Chand
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are using windows, ideally it should be in catalina.bat or setenv.bat.
Can you check both files for the value of JAVA_OPTS
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also please note that Tomcat5 is no longer a supported release. The latest version of Tomcat is Tomcat 8 and the Tomcat support team at apache.org only support the newest 3 versions of Tomcat.

Tomcat changed significantly between versions 5 and 6, although the setenv.bat/setenv.sh files weren't affected by those changes.
 
alsoumahi alBatal
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tapas Chand wrote:If you are using windows, ideally it should be in catalina.bat or setenv.bat.
Can you check both files for the value of JAVA_OPTS



I have checked for the both files , but file setenv is not exist in my tomcat\bin , and in catalina.bat there is not set value for JAVA_OPTS I got this as beolw

set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
:noJuli


%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end

:end
 
Tapas Chand
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

alsoumahi alBatal wrote:I have tried to change in registry


Have you reverted the changes back.
Look for the key "jvmmx" in registry.
 
reply
    Bookmark Topic Watch Topic
  • New Topic