Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.5, 3.6, 4.0-ALPHA
-
None
-
unsigned applet
-
New
Description
Using Lucene (i.e. writing a Document to a RAMDirectory) in an unsigned applet causes an AccessControlException because Constants.java is attempting to read a System property that is not allowed.
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "sun.arch.data.model" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at org.apache.lucene.util.Constants.<clinit>(Constants.java:84)
on line 84: final String x = System.getProperty("sun.arch.data.model");
We have tested setting the String x to the property value for "java.vm.name" and find that works for us...