简体   繁体   English

Jboss-eap-6.3 无法为 object 堆保留足够的空间

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

I have Java7 running on 32-bit Windows.我在 32 位 Windows 上运行 Java7。
When I am running Jboss-eap-6.3 server, I am getting the following exception repeatedly each time I try to run the program.当我运行 Jboss-eap-6.3 服务器时,每次尝试运行该程序时都会反复出现以下异常。

  • D:\mysoft\jboss-eap-6.3\bin>standalone.bat
  • Calling D:\mysoft\jboss-eap-6.3\bin\standalone.conf.bat调用D:\mysoft\jboss-eap-6.3\bin\standalone.conf.bat
  • Setting JAVA property to C:\Program Files\Java\jdk1.7.0_10\bin\java将 JAVA 属性设置为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?谁能帮我?

You can also resolve this by changing JAVA_OPTS value under standalone.conf.bat. 您还可以通过更改standalone.conf.bat下的JAVA_OPTS值来解决此问题。

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"

It's actually a problem with the startup script. 这实际上是启动脚本的一个问题。 Here's the bug for that https://bugzilla.redhat.com/show_bug.cgi?id=956281 . 这是https://bugzilla.redhat.com/show_bug.cgi?id=956281的错误。 The workaround is to remove the perm gen setting from the JAVA_OPTS line: 解决方法是从JAVA_OPTS行中删除perm gen设置:

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

What is the memory available with your machine? 您的机器可用的内存是多少? I see the parameters -Xms1G -Xmx1G . 我看到参数-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. 这意味着您的JVM将以Xms=1GB的内存量启动,并且最多可以使用Xmx=1GB的内存量。

I think, may be you reduce the amount of memory (like -Xmx2048m -Xms256m ). 我想,可能是你减少了内存量(比如-Xmx2048m -Xms256m )。

I hope it helps. 我希望它有所帮助。

You can refer to this . 你可以参考这个

According to the above Federico Sierra answer under jboss-eap-6.3\\domain\\configuration location host.xml file is present. 根据以上Federico Sierra在jboss-eap-6.3\\domain\\configuration位置下的host.xml文件存在。 In that file I just commented the following line: 在该文件中,我刚评论了以下行:

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

It's working. 它正在发挥作用。 Thanks Federico Sierra. 谢谢Federico Sierra。

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 转至:jboss-eap-6.4 \\ domain \\ configuration - > host.xml,并设置此大小

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

And also go to: jboss-eap-6.4\\standalone\\configuration -> standalone.xml, have this size set up 还可以访问:jboss-eap-6.4 \\ standalone \\ configuration - > standalone.xml,设置此大小

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

And now Restart your Eclipse and try Run your Jboss6.1+ server it should be working. 现在重新启动Eclipse并尝试运行它应该正常工作的Jboss6.1 +服务器。

Also set this in host.xml: <permgen size="256m" max-size="256m"/> Good Luck. 也可以在host.xml: <permgen size="256m" max-size="256m"/>设置host.xml: <permgen size="256m" max-size="256m"/>祝你好运。

For me its worked by switching to 64bit JDK... When I was using 32 bit jdk I was facing this issue对我来说,它通过切换到 64 位 JDK 来工作......当我使用 32 位 jdk 时,我遇到了这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM