We're updating the issue view to help you get more done. 

Local Glassfish using standalone configuration does not respect GeneralPropertySet.JAVA_HOME

Description

asadmin start-domain forks a JVM by itself and Cargo does currently not enforce the proper java home for this. Came across this when trying to have Cargo start Glassfish 3.0.1 in an environment where Java 1.5 is in the PATH. This resulted in

1 2 3 4 5 6 7 Waiting for DAS to start .Error starting domain: cargo-domain. The server exited prematurely with exit code 1. Before it died, it produced the following output: Error: client VM not supported Command start-domain failed.

when PATH pointed at a 64bit JRE 1.5 and

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Waiting for DAS to start .Error starting domain: cargo-domain. The server exited prematurely with exit code 1. Before it died, it produced the following output: FATAL ERROR in native method: processing of -javaagent failed java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:133) Exception in thread "main" Command start-domain failed.

when using a 32bit JRE 1.5.

The attached patch fixes this by filtering the domain.xml to point at the proper/configured JRE installation.

Status

Assignee

Savas Ali Tokmen

Reporter

Benjamin Bentmann

Components

Fix versions

Affects versions

1.0.6

Priority

Major