[
https://issues.apache.org/jira/browse/SOLR-11346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160863#comment-16160863
]
Jan Høydahl commented on SOLR-11346:
------------------------------------
Agree. Historically I think we wanted the example config to load even if some
libs could not be found, but it is IMO a better user experience to get a clear
ERROR.
What is the use case behind supporting a lib regex to an empty folder? It
sounds a bit trappy too. If the folder is empty, then delete both the folder
and the {{<lib>}}, at least when it comes to our official examples?
> 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]