PACL incompatibility with MacOS X JDK
Activity
Show:
Justin Choi August 20, 2013 at 11:42 AM
PASSED Manual Testing using the following steps:
1. Start Liferay on a MAC OS X environment with JDK 1.7_06.
2. In the test-pacl-portlet, set
security-manager-enabled=true
in the liferay-plugins-package.properties.
3. Deploy the chat, flash, sample-service-builder, and test-pacl portlets. For 6.1.x, also deploy the portal-compat-hook.
4. Verify there are no console errors arising from PACL not reading the right JDK files in a MAC OS X env.
Fixed on:
MAC OS X. Tomcat 7 + MySQL 5. Portal 6.1.x EE GIT ID: 239ca1fec2e3a078fb7852f241da6728558a830f. Plugins 6.1.x EE GIT ID: 7aa0fd1417348715be8cc3068068e034a021d455.
MAC OS X. Tomcat 7 + MySQL 5. Portal 6.2.x GIT ID: 7ab9e3d7486e926a6357345b1b4de5be381a7731. Plugins 6.2.x GIT ID: b9dc6cd23f2d3eef715950bfbeaceb4e54dd15f5.
Fixed
Pinned fields
Click on the next to a field label to start pinning.
Assignee
Reporter
Neil Griffin
Neil GriffinLabels
Branch Version/s
6.1.x
Backported to Branch
Committed
Fix versions
Affects versions
Priority
Created January 28, 2013 at 6:32 AM
Updated June 25, 2023 at 10:46 PM
Resolved February 26, 2013 at 6:15 PM
On Mac OS X systems, the JDK folder structure is a little different than on Linux and Windows:
/System/Library/Frameworks/JavaVM.framework/Classes/
/System/Library/Frameworks/JavaVM.framework/Commands/
/System/Library/Frameworks/JavaVM.framework/Frameworks/
/System/Library/Frameworks/JavaVM.framework/Headers/
/System/Library/Frameworks/JavaVM.framework/Home/ *** THIS IS $JAVA_HOME BTW ***
/System/Library/Frameworks/JavaVM.framework/JavaVM/
/System/Library/Frameworks/JavaVM.framework/Libraries/
/System/Library/Frameworks/JavaVM.framework/Resources/
/System/Library/Frameworks/JavaVM.framework/Versions/
When a portlet tries to scan the ClassPath for JARs, the JVM will return a list of URLs to JARs in the filesystem. Currently, PACK only provides READ permission on files under $JAVA_HOME/lib but on Mac OS X it is necessary to have read permission on $JAVA_HOME/../Classes as well.
Also, the JVM will return a list of all JARs found under folders specified in the {$java.ext.dirs} system property. For example:
/Library/Java/Extensions/
/System/Library/Java/Extensions/
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/
So it would be necessary for PACL to include those folders as well.