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

12,923

Solution 1

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

Solution 2

So, just for clarity...you are engaging in double virtualization. You have a JAVA Virtual machine on top of an OS virtual machine so any call for resources has to thunk through two layers of arbitration before it gets to a physical resource like RAM or CPU, right?

So, have you tried this on a host with only a single layer of arbitration, such as Windows workstation ( for less than 2GB allotments) or Windows server instance (for greater than 2GB allotments) not running inside of a virtual machine? I am trying to remove complexity and moving parts to get to the simplest model which demonstrates the error to elinate the possibility that one of the complexities is the cause.

If you could share some of the end goal this might be helpful as well. Are you experiencing errors related to memory on your virtual users which are driving you to mod the default parameters for the JAVA virtual user machine execution?

Share:
12,923
venus.w
Author by

venus.w

Updated on June 17, 2022

Comments

  • venus.w
    venus.w almost 2 years

    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