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
when PATH pointed at a 64bit JRE 1.5 and
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.