[
https://issues.apache.org/jira/browse/STANBOL-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rupert Westenthaler resolved STANBOL-528.
-----------------------------------------
Resolution: Fixed
fixed with #1297918
> ManagesSolrServer is unable to store ManagedIndexMetadata because of an NPE
> ---------------------------------------------------------------------------
>
> Key: STANBOL-528
> URL: https://issues.apache.org/jira/browse/STANBOL-528
> Project: Stanbol
> Issue Type: Bug
> Components: Commons
> Reporter: Rupert Westenthaler
> Assignee: Rupert Westenthaler
>
> 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.
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira