Error occurred during initialization of VM Could not reserve enough space for object heap

venus.w picture venus.w · Jan 22, 2013 · Viewed 12.8k times · Source

I have virtual machine with 3Giga Ram Memory. I am working with Java protocol on Loadrunner. I am trying to set the addtional VM Params to be more than 256M but always getting this error. I tried :-Xms512 -Xmx512 without success. Please response ASAP - i am stuck with that issue for the last 2 days .

Thanks.. (I am working with jdk 1.6.0 and once try run the flow i have free memory of 2000MB)

Notify: Found jdk version: 1.6.0. Notify: classpath=D:\seamlessServerPerfTest\SSCallAV\;c:\program files\hp\loadrunner\classes\srv;c:\program files\hp\loadrunner\classes;D:\seamlessServerPerfTest\lib\SSCallAV_8leg.jar;D:\seamlessServerPerfTest\lib\json-lib-2.4-jdk15.jar;D:\seamlessServerPerfTest\lib\todejolt.jar;D:\seamlessServerPerfTest\lib\protobuf-java-2.4.1.jar;D:\jython2.5.2\Lib\site-packages\trilead-ssh2-build213.jar;D:\jython2.5.2\Lib\site-packages\asimessagehandler.jar;D:\jython2.5.2\Lib\site-packages\dblibrary-1.0.jar;D:\jython2.5.2\Lib\site-packages\jolt.jar;D:\jython2.5.2\Lib\site-packages\ojdbc14.jar;D:\postgreSql\postgresql-9.1-901.jdbc4.jar;;; Notify: Path=C:\Program Files\Java\jdk1.6.0_12\jre\bin\client;C:\PROGRA~1\HP\LOADRU~1\bin;C:\PROGRA~1\HP\LOADRU~1\bin\tulip\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Python27;C:\Program Files\Java\jdk1.6.0_12\bin;D:\Python27\Scripts;D:\jython2.5.2\Lib\site-packages\dblibrary-1.0.jar;D:\jython2.5.2\Lib\site-packages\jolt.jar;D:\jython2.5.2\Lib\site-packages\ojdbc14.jar;D:\postgreSql\postgresql-9.1-901.jdbc4.jar;D:\jython2.5.2;D:\Python27\Lib\site-packages;D:\Python27\Lib\site-packages\robot\libraries;d:\IEDriverServer.exe;d:\jython2.5.2\bin;D:\jython2.5.2\Lib\site-packages;; Notify: VM Params: -Xms512m -Xmx512m. Notify: Error occurred during initialization of VM Notify: Could not reserve enough space for object heap

Answer

mreaper picture mreaper · Jan 22, 2013

This really could be the case. The JVM might really not be able to reserve the required memory.

You can try the below if it works

First, run java -XX:MaxHeapSize=512m Test1. Then run java -Xms512m - Xmx512m Test1