Bug #44157 Service Manager on Mac picks up extension libraries instead of ours
Submitted: 8 Apr 2009 16:08 Modified: 22 May 2009 15:12
Reporter: Mark Matthews Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Installing Severity:S2 (Serious)
Version:2.0.5 OS:MacOS
Assigned to: Keith Russell CPU Architecture:Any

[8 Apr 2009 16:08] Mark Matthews
Description:
The Mac OS/X version of the service manager uses the system's JRE. The problem with this is that the system JRE picks up libraries in /Library/Java/Extensions, and those are authoritative over the libraries we ship, causing problems when customers have things like Connector/J, Spring, Hibernate, etc. installed there.

How to repeat:
Install an old version of Connector/J into /Library/Java/Extensions and try and start our application.

Suggested fix:
On the Mac *only*, append "-Djava.ext.dirs=[some path in our install that contains no .jar files]" to JAVA_OPTS in catalina.sh
[16 Apr 2009 20:38] Keith Russell
Patch installed in versions => 2.1.0.1026.
[30 Apr 2009 1:33] Keith Russell
Patch installed in versions => 2.1.0.1034.
[30 Apr 2009 16:05] Marcos Palacios
Verified fixed in build 2.1.0.1034.
[21 May 2009 15:57] Marcos Palacios
Verified fixed in build 2.1.0.1047.
[22 May 2009 13:56] Tony Bedford
An entry was added to the 2.1.0 changelog:

The Mac OS X version of the Service Manager used the system JRE, which accessed the libraries located in /Library/Java/Extensions. These are subsequently referenced by the Service Manager rather than the libraries shipped with MySQL Enterprise Monitor. This caused problems when customers had additional Java-related products installed such as Connector/J, Spring, and Hibernate.
[22 May 2009 15:12] Tony Bedford
Changelog entry corrected:

The Mac OS X version of the Service Manager uses the system JRE. The system JRE loads the libraries located in /Library/Java/Extensions. As libraries in the extensions directory take precedence over other libraries, this caused conflicts when user extension libraries were installed there, as these would be used by the JRE when running Service Manager, instead of the shipped libraries. This happened when Java-related products were installed such as Connector/J, Spring, and Hibernate.

This fix stops user-installed extension libraries from being used when the JRE runs the Service Manager, thus giving a “pristine” environment with no library collisions.