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

ManagesSolrServer is unable to store ManagedIndexMetadata because of an NPE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0-incubating
    • Component/s: Commons
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: