3

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?

Federico Sierra
  • 5,118
  • 2
  • 23
  • 36
java developer
  • 393
  • 2
  • 7
  • 20

6 Answers6

6

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
Federico Sierra
  • 5,118
  • 2
  • 23
  • 36
6

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"
Kushal
  • 71
  • 1
  • 4
2

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.

Community
  • 1
  • 1
Jivi
  • 94
  • 1
  • 3
  • 8
1

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.

smottt
  • 3,272
  • 11
  • 37
  • 44
java developer
  • 393
  • 2
  • 7
  • 20
  • Please don't post an "answer" to comment on another answer. If @federicosierra's answer helped you then (upvote and) mark it as accepted. – tripleee Jan 04 '16 at 09:06
1

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.

Sanjuktha
  • 1,065
  • 3
  • 13
  • 26
Dinesh Jr
  • 11
  • 1
0

For me its worked by switching to 64bit JDK... When I was using 32 bit jdk I was facing this issue