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

Initialization of ManagedSolrServer may fail on Windows because '/' is used within relative path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • commons-0.11.0
    • 0.12.0
    • Commons
    • None
    • any OS that uses other file seperators than '/' - all Windows OS versions

    Description

      The Configuration of the ManagedSolrServer expects the configuration of a Solr CoreContainer (basically only the solr.xml file) to be provided by the bundle under the relative path "solr/conf" (the constant with the name CONFIG_DIR).

      For determining the target Files any '/' used as paths for reading data from JAR files need to be converted to the path separator of the system ( '\' for Windows OS). However the '/' contained in "solr/conf" is not converted accordingly before calculating the relative path. Because of the the relative path can not be determined correctly causing a WARN level log like

      [FelixDispatchQueue] org.apache.stanbol.commons.solr.utils.ConfigUtils Context solr/conf\ not found in resource bundle:\\75.0:0\solr\conf\solr.xml -> ignored!

      and later an Exception like

      [FelixDispatchQueue] org.apache.stanbol.commons.solr.managed
      [org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl] The activate method has
      thrown an exception (java.lang.IllegalArgumentException: The parsed SolrServerDir '

      {path}' MUST refer to a Directory) java.lang.IllegalArgumentException: The parsed SolrServerDir '{path}

      ' MUST refer to a Directory
      at org.apache.stanbol.commons.solr.SolrServerAdapter$SolrServerProperties.<init> SolrServerAdapter.java:693)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: