Eric D. Schabell: JBoss BRMS install example repository gives OutOfMemoryError: PermGen space

Sunday, March 14, 2010

JBoss BRMS install example repository gives OutOfMemoryError: PermGen space

When setting up a demo of JBoss BRMS 5.0.1 (don't think it will really matter which BRMS 5.x you use) in a JBoss EAP 4.3 product I was confronted with an error.

After server start-up you login to http://localhost:8080/jboss-brms which asks you if you want to install the sample repository in your new system. When I said yes, it would run a bit and then give me an error like this:
22:05:00,094 ERROR [STDERR] Exception in thread "http-127.0.0.1-8080-5" 
22:05:00,094 ERROR [STDERR] java.lang.OutOfMemoryError: PermGen space
22:05:00,152 ERROR [ContainerBase] Servlet.service() for servlet guvnorService threw exception
java.lang.OutOfMemoryError: PermGen space
 at java.lang.Throwable.getStackTraceElement(Native Method)
        etc.........

To fix this you need to tweak the jboss-as/bin/run.sh by adding near the top of the file the following line:
# Set a sane PermSize.
JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=256m"

Restart EAP 4.3 and the installation of your sample repository will run fine.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.