Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4205

Constants.java generates AccessControl Exception in unsigned applet

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.5, 3.6, 4.0-ALPHA
    • None
    • core/index
    • 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...

      Attachments

        Activity

          People

            Unassigned Unassigned
            srose Stuart Rose
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: