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

ManagesSolrServer is unable to store ManagedIndexMetadata because of an NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.0-incubating
    • Commons
    • None

    Description

      The managed SolrServer uses the persitent storage of the OSGI bundle to store metadata about the managed indexes.

      This directory is lookedup by the ManagedIndexMetadata#saveIndexConfig(..) method by calling

      ComponentContext#getBundleContext()#getDataFile(relativePath)

      on the component context of the ManagedSolrServer.

      However this look may fail for two reasons:

      1. the OSGI environment does not have file system support
      2. the bundle context (stored as member variable) is no longer valid

      In both cases the #getDataFile(..) method will return NULL causing the NPE reported by this issue.

      Solution:

      1. use relative path to the working directory if the OSGI environment is missing file system support
      2. determine the config directory within the constructor of ManagedIndexMetadata and do not keep the parsed component context of the ManagedSolrServer.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: