WLS JVM Settings
Asked Answered
P

1

1

First of all I am new to WLS. I have been searching for this issue since yesterday but couldn't find a solution. I am getting this error:

C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client   -Xms512m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=512m -XX:MaxPermSize=1024m -Dweblogic.Name=DefaultServer - ....
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

I have setted the JVM options in setDomainEnv.cmd (I am on Windows 7 64-bit) like this:

@REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values
set USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=512m -XX:MaxPermSize=1024m

if NOT "%USER_MEM_ARGS%"=="" (
    set MEM_ARGS=%USER_MEM_ARGS%
)

I also changed these values:

set XMS_SUN_64BIT=512
set XMS_SUN_32BIT=512
set XMX_SUN_64BIT=1024
set XMX_SUN_32BIT=1024
set XMS_JROCKIT_64BIT=512
set XMS_JROCKIT_32BIT=512
set XMX_JROCKIT_64BIT=1024
set XMX_JROCKIT_32BIT=1024


if "%JAVA_VENDOR%"=="Sun" (
    set WLS_MEM_ARGS_64BIT=-Xms512m -Xmx1024m
    set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx1024m
) else (
    set WLS_MEM_ARGS_64BIT=-Xms512m -Xmx1024m
    set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx1024m
)

if "%JAVA_VENDOR%"=="Oracle" (
    set CUSTOM_MEM_ARGS_64BIT=-Xms%XMS_JROCKIT_64BIT%m -Xmx%XMX_JROCKIT_64BIT%m
    set CUSTOM_MEM_ARGS_32BIT=-Xms%XMS_JROCKIT_32BIT%m -Xmx%XMX_JROCKIT_32BIT%m
) else (
    set CUSTOM_MEM_ARGS_64BIT=-Xms%XMS_SUN_64BIT%m -Xmx%XMX_SUN_64BIT%m
    set CUSTOM_MEM_ARGS_32BIT=-Xms%XMS_SUN_32BIT%m -Xmx%XMX_SUN_32BIT%m
)

but they did not change the result. What is wrong with the above configuration?

Polythene answered 28/11, 2014 at 13:43 Comment(3)
Do you have enough memory on the machine running WLS? the error indicates the JVM cannot allocate the required memoryInspector
My machine has 16GB RAM. I have this "MAVEN_OPTS = -Xmx512m -XX:MaxPermSize=1024m" in my environment variables; but it also seems fine..Polythene
it was the MAVEN_OPTS parameter. Thanks for making me think about other options :)Polythene
P
1

The problem was the MAVEN_OPTS environmental variable. It was: MAVEN_OPTS = -Xmx512m -XX:MaxPermSize=1024m I changed it to: -Xms512m -Xmx1024m --XX:PermSize=512m -XX:MaxPermSize=1024m

Polythene answered 1/12, 2014 at 8:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.