Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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.