glassfish
  1. glassfish
  2. GLASSFISH-9692

(RN) Installer fails to recognize JDK 1.6 on MacOS

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: v2.1.1
    • Fix Version/s: None
    • Component/s: installation
    • Labels:
      None
    • Environment:

      Operating System: Mac OS X
      Platform: Macintosh

      Description

      While installing on MacOS 10.5.x and having the Java Preferences set to JDK 1.6,
      the installer fails to recognize the settings. When the server (asadmin
      start-domain), it is done using JDK 1.5. Closer examination shows the
      asenv.conf (<install directory>/config/asenv.conf) file has the following value

      AS_JAVA="/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home"

      While the system has
      $ echo $JAVA_HOME
      /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

      $ $ java -version
      java version "1.6.0_15"
      Java(TM) SE Runtime Environment (build 1.6.0_15-b03-226)
      Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-92, mixed mode)

      and the Java Preferences (Macintosh HD -> Applications -> Utilities -> Java
      Preferences) is set to Java SE 6 in the Java Applications frame.

        Activity

        Hide
        nluu added a comment -

        We need to include this in the release notes. Systems which do not have JDK
        1.5.x will also run into this problem.

        Show
        nluu added a comment - We need to include this in the release notes. Systems which do not have JDK 1.5.x will also run into this problem.
        Hide
        scatari added a comment -

        Applicable only to 2.1.1 installs.

        Show
        scatari added a comment - Applicable only to 2.1.1 installs.
        Hide
        Snjezana Sevo-Zenzerovic added a comment -

        If I may interject - note that this is apparently v2.1.1, not v3 installer, so
        there are no log files other than setup.xml output. I believe that setup.xml
        indeed hard-codes JDK 1.5.0 location on MacOS , so that should be fixed in next
        2.x release.

        Show
        Snjezana Sevo-Zenzerovic added a comment - If I may interject - note that this is apparently v2.1.1, not v3 installer, so there are no log files other than setup.xml output. I believe that setup.xml indeed hard-codes JDK 1.5.0 location on MacOS , so that should be fixed in next 2.x release.
        Hide
        scatari added a comment -

        Please attach the installer log(s) under /var/tmp. They may be available under
        /tmp depending on how you have configured your machine.

        Show
        scatari added a comment - Please attach the installer log(s) under /var/tmp. They may be available under /tmp depending on how you have configured your machine.
        Hide
        Alex Pineda added a comment -

        Sorry for not being clear on the summary, but the issue is not about Java
        Preferences. The issue is that on MacOS AS_JAVA appears to be hard coded to JDK
        1.5. As mentioned, JDK 1.6 is set in the path and in $JAVA_HOME (as noted in
        the report). I added Java Preferences to indicate that everything is set. When
        I manually change AS_JAVA in asenv.conf. Everything is works as expected. In
        short, the issue is still valid. Re-opening the bug.

        Show
        Alex Pineda added a comment - Sorry for not being clear on the summary, but the issue is not about Java Preferences. The issue is that on MacOS AS_JAVA appears to be hard coded to JDK 1.5. As mentioned, JDK 1.6 is set in the path and in $JAVA_HOME (as noted in the report). I added Java Preferences to indicate that everything is set. When I manually change AS_JAVA in asenv.conf. Everything is works as expected. In short, the issue is still valid. Re-opening the bug.
        Hide
        scatari added a comment -

        The installer picks up JDK path from JAVA_HOME and PATH, not from system preferences, and in this case,
        JDK 1.5 has been picked up as it might be defined in one of these variables.

        Show
        scatari added a comment - The installer picks up JDK path from JAVA_HOME and PATH, not from system preferences, and in this case, JDK 1.5 has been picked up as it might be defined in one of these variables.
        Hide
        kumara added a comment -

        -> scatari

        Show
        kumara added a comment - -> scatari
        Hide
        Alex Pineda added a comment -

        Correction. The Server is started with JDK 1.5 by default regardless of the
        settings.

        A workaround is to manually edit the asenv.conf file and add the AS_JAVA value to:
        AS_JAVA="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home"

        and restart the server (asadmin stop-domain, asadmin start-domain). Everything
        works afterwards.

        Show
        Alex Pineda added a comment - Correction. The Server is started with JDK 1.5 by default regardless of the settings. A workaround is to manually edit the asenv.conf file and add the AS_JAVA value to: AS_JAVA="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home" and restart the server (asadmin stop-domain, asadmin start-domain). Everything works afterwards.

          People

          • Assignee:
            scatari
            Reporter:
            Alex Pineda
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: