Saturday, August 1, 2015

JVM failed to start in GlassFish Server 4.1

Problem:

When trying to start up the domain in Oracle GlassFish Server 4.1, we get the following error:
[glassfish@demo logs]$ $GLASSFISH_HOME/bin/asadmin start-domain 
JVM failed to start: com.sun.enterprise.admin.launcher.GFLauncherException: The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Absolutely nothing is showing up in the $GLASSFISH_HOME/glassfish/domains/domain1/logs/server.log log file.


Solution:

1. Double-check the startup parameters of the JVM in the domain.xml file for invalid entries.


In our example, the $GLASSFISH_HOME/glassfish/domains/domain1/config/domain.xml had the following invalid entry:
<jvm-options>-myUrl=https://dev.raastech.com</jvm-options>
When the correct format should have been as follows:
<jvm-options>-DmyUrl=https://dev.raastech.com</jvm-options>


Applicable Versions:
  • Oracle GlassFish Server 4.1


No comments:

Post a Comment