Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15017

The core's lib/ folder content is not loaded in the classloader anymore when the core's configuration does not define any <lib> element

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 8.7
    • Fix Version/s: 8.8
    • Component/s: None
    • Labels:

      Description

      I just upgraded solr-core (I'm using Solr in embedded mode) from 8.5.1 to 8.7.0 and it seems that the lib subfolder inside a core folder is not taken into account anymore.

      Works fine when I move the lib/ folder one level up (in the Solr home folder) but when the lib folder with the plugins is located in the core folder it cannot find any of the classes.

      I debugged it a little and I think the regression was caused by the refactoring done in https://github.com/apache/lucene-solr/commit/732348ec7f9c6b6f7bf9d539a40e50d16198cccc#diff-473fbcdab103c08461ad1b3c3bb1c6d56f1bcd16d6ce341d80855db2cb20a427R749 : the handling of the lib/ core's sub folder was moved to SolrConfig#initLibs() but unfortunately the check to make sure there is at least one <lib> element in the configuration file was not removed which means that if you don't have any of those then the content of the lib/ folder is totally ignored.

      That debugging was easy enough but I don't know Solr internals enough to propose something clean to fix the issue in a pull request.

      The workaround is to make sure there is at least one <lib/> element (for example {{<lib dir="lib" regex=".*\.jar" />}}) in the core's solrconfig.xml file.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              dsmiley David Smiley
              Reporter:
              tmortagne Thomas Mortagne

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m

                  Issue deployment