Uploaded image for project: 'Codehaus Cargo'
  1. CARGO-904

Local Glassfish using standalone configuration does not respect GeneralPropertySet.JAVA_HOME

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 1.0.6
    • Fix versions: 1.1.0
    • Components: Glassfish
    • Labels:
      None

      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

      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

      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.

        Attachments

          Activity

            People

            • Assignee:
              savasalitokmen Savas Ali Tokmen (Inactive)
              Reporter:
              benjaminbentmann Benjamin Bentmann (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: