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

throw if solrconfig.xml <lib> is invalid

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      This ticket proposes to throw an exception if a configured <lib> element is invalid. As janhoy mentioned on the dev mailing list today the DIH example currently only warns in this scenario e.g.

      WARN ... org.apache.solr.core.SolrConfig; Couldn't add files from /Users/cpoerschke/git/solr/contrib/dataimporthandler/lib filtered by .*\.jar to classpath: /Users/cpoerschke/git/solr/contrib/dataimporthandler/lib
      

      Instead the new behaviour would be e.g.

      ...
      Caused by: java.nio.file.NoSuchFileException: /Users/cpoerschke/git/solr/contrib/dataimporthandler/lib
              at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
              at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
              at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
              at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:407)
              at java.nio.file.Files.newDirectoryStream(Files.java:589)
              at org.apache.solr.core.SolrResourceLoader.getURLs(SolrResourceLoader.java:273)
              at org.apache.solr.core.SolrResourceLoader.getFilteredURLs(SolrResourceLoader.java:305)
              at org.apache.solr.core.SolrConfig.initLibs(SolrConfig.java:748)
              at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:207)
              at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:181)
              ...
      ...
      

      if the directory does not exist but still just a warning if the directory exists but there are no matching files.

      Attachments

        1. SOLR-11346.patch
          2 kB
          Christine Poerschke

        Activity

          People

            Unassigned Unassigned
            cpoerschke Christine Poerschke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: