[GLASSFISH-9692] (RN) Installer fails to recognize JDK 1.6 on MacOS Created: 23/Sep/09  Updated: 06/Jan/11

Status: Open
Project: glassfish
Component/s: installation
Affects Version/s: v2.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Alex Pineda Assignee: scatari
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS X
Platform: Macintosh


Issuezilla Id: 9,692
Status Whiteboard:

v3_exclude

Tags: 3_1-exclude, future-exclude

 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.



 Comments   
Comment by Alex Pineda [ 23/Sep/09 ]

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.

Comment by kumara [ 23/Sep/09 ]

-> scatari

Comment by scatari [ 24/Sep/09 ]

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.

Comment by Alex Pineda [ 24/Sep/09 ]

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.

Comment by scatari [ 24/Sep/09 ]

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

Comment by Snjezana Sevo-Zenzerovic [ 24/Sep/09 ]

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.

Comment by scatari [ 25/Sep/09 ]

Applicable only to 2.1.1 installs.

Comment by nluu [ 22/Oct/09 ]

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

Generated at Tue Jul 28 01:30:25 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.