Starting LiveCycle as Windows service fails with "java.lang.OutOfMemoryError: PermGen space"

Issue

After you have configured JBoss to run as a Windows service following the instructions from this link (Installing and Deploying LiveCycle ES4 for JBoss, chapter 10.2 Install the Windows service), LiveCycle will fail to start with the following exception:

java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:792) at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:48) at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:637) at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:596) at java.security.AccessController.doPrivileged(Native Method)

If you launch JBoss from the command line, LiveCycle starts successfully.

Cause

This issue is related to an exisiting bug (# JBPAPP-5403) on JBoss EAP, as described on this link. All JVM arguments setting the memory allocation are ignored, as can be seen from the following line in the boot.log: