Uploaded image for project: 'Stanbol (Retired)'
  1. Stanbol (Retired)
  2. STANBOL-863

SolrYard needs to access SolrServer using AccessController.doPrivileged

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • entityhub-0.11.0
    • Entityhub
    • None

    Description

      The access of Apache Solr to Files in the solr instanceDir is not permitted by the SecurityManager given the permissions of the anonymous user. This results in exceptions such as

      Caused by: java.security.AccessControlException: access denied (java.io.FilePermission

      {stanbol-working-dir}

      /stanbol/indexes/default/entityhub-2012.12.22/data/index.propertiesread)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
      [..]
      at java.io.File.exists(File.java:731)
      at org.apache.solr.core.SolrCore.getNewIndexDir(SolrCore.java:197)

      Typically this appears when adding Documents to the SolrServer. Therefore users will see those Exceptions on calls to store(..), update(..) or remove(..). However internally those exceptions do also appear when storing the namespace prefix map to the SolrServer.

      User facing Exceptions will look like

      Caused by: org.apache.stanbol.entityhub.servicesapi.yard.YardException:
      Exception while adding Document to Solr
      at org.apache.stanbol.entityhub.yard.solr.impl.SolrYard.store(SolrYard.java:1170)

      resulting in HTTP responses with status 500

      Attachments

        Issue Links

          Activity

            People

              rwesten Rupert Westenthaler
              rwesten Rupert Westenthaler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: