[
https://issues.apache.org/jira/browse/SOLR-11346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16163325#comment-16163325
]
Christine Poerschke commented on SOLR-11346:
--------------------------------------------
bq. ... What is the use case behind supporting a lib regex to an empty folder?
...
Fair point, yes, warnings can easily go unnoticed. And when it comes to
retiring libs, the {{<lib>}} clause could always be removed ahead of the jar
files being removed from the folder. So on that basis finding no matching jars
should be an error too.
> throw if solrconfig.xml <lib> is invalid
> ----------------------------------------
>
> Key: SOLR-11346
> URL: https://issues.apache.org/jira/browse/SOLR-11346
> Project: Solr
> Issue Type: Task
> Reporter: Christine Poerschke
> Priority: Minor
> Attachments: SOLR-11346.patch
>
>
> 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.
> {code}
> 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
> {code}
> Instead the new behaviour would be e.g.
> {code}
> ...
> 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)
> ...
> ...
> {code}
> if the directory does not exist but still just a warning if the directory
> exists but there are no matching files.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]