Jboss-eap-6.3 Could not reserve enough space for object heap

岁酱吖の 提交于 2019-12-10 20:03:46

问题


I have Java7 running on 32-bit Windows.
When I am running Jboss-eap-6.3 server, I am getting the following exception repeatedly each time I try to run the program.

  • D:\mysoft\jboss-eap-6.3\bin>standalone.bat
  • Calling D:\mysoft\jboss-eap-6.3\bin\standalone.conf.bat
  • Setting JAVA property to C:\Program Files\Java\jdk1.7.0_10\bin\java

JBoss Bootstrap Environment
JBOSS_HOME: "D:\mysoft\jboss-eap-6.3"
JAVA: "C:\Program Files\Java\jdk1.7.0_10\bin\java"

JAVA_OPTS: "-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-Tra
ceClassUnloading -client -Dprogram.name=standalone.bat -Xms1G -Xmx1G -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true  -Djboss.modules.policy-per
missions=true  -Djboss.modules.system.pkgs=org.jboss.byteman"

...
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Can any one help me?


回答1:


It's actually a problem with the startup script. Here's the bug for that https://bugzilla.redhat.com/show_bug.cgi?id=956281. The workaround is to remove the perm gen setting from the JAVA_OPTS line:

Cause: The max perm gen space parameter is causing the JVM to not be created, which then prevents the server from starting.  This is specifically on Windows 8 32-bit JVM.
Consequence: The server will not start.
Workaround (if any): Remove the -XX:MaxPermSize=256m



回答2:


You can also resolve this by changing JAVA_OPTS value under standalone.conf.bat.

old

rem # JVM memory allocation pool parameters - modify as appropriate.
set "JAVA_OPTS=-Xms1303M -Xmx1303M -XX:MaxPermSize=256M"

new

set "JAVA_OPTS=-Xms256M -Xmx256M -XX:MaxPermSize=256M"



回答3:


What is the memory available with your machine? I see the parameters -Xms1G -Xmx1G. This means that your JVM will be started with Xms=1GB amount of memory and will be able to use a maximum of Xmx=1GB amount of memory.

I think, may be you reduce the amount of memory (like -Xmx2048m -Xms256m).

I hope it helps.

You can refer to this.




回答4:


According to the above Federico Sierra answer under jboss-eap-6.3\domain\configuration location host.xml file is present. In that file I just commented the following line:

<permgen size="256m" max-size="256m"/>

It's working. Thanks Federico Sierra.




回答5:


If it still doesn't work after trying all above options. Go To: jboss-eap-6.4\domain\configuration -> host.xml, and have this size set up

<heap size="256m" max-size="256m"/>

And also go to: jboss-eap-6.4\standalone\configuration -> standalone.xml, have this size set up

set "JAVA_OPTS=-Xms256M -Xmx256M -XX:MaxPermSize=256M"

And now Restart your Eclipse and try Run your Jboss6.1+ server it should be working.

Also set this in host.xml: <permgen size="256m" max-size="256m"/> Good Luck.



来源:https://stackoverflow.com/questions/26356305/jboss-eap-6-3-could-not-reserve-enough-space-for-object-heap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!