[ 
https://issues.apache.org/jira/browse/NUTCH-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14002379#comment-14002379
 ] 

Sebastian Nagel commented on NUTCH-1776:
----------------------------------------

After a closer look (sorry, it's late): a plugin folder may be a also relative 
to any element of the class path. A simple test {{isDirectory()}} does not 
cover this cases and may produce false warnings. Inside 
{{getPluginFolder(name)}} there are already various checks, but there is no 
check for a missing absolute path. That's fixed in the attached patch.

??Do you think a meaningful exception should be thrown???
Yes, that would be nice. If the property "plugin.folders" contains dubious 
paths that's most likely a misconfiguration. However, you can add multiple 
comma-separated paths. If some of them do not contain plugins that's not a 
problem. If there are no problems at all: most likely a serious 
misconfiguration. The patch logs an extra in this case. No error, because there 
may be cases where no plugin is required.
But again: the error trace shown if loading some plugin fails is not really 
helpful. Does anyone have an idea how to improve the error message or even 
catch the situation in advance?

> Log incorrect plugin.folder file path
> -------------------------------------
>
>                 Key: NUTCH-1776
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1776
>             Project: Nutch
>          Issue Type: Bug
>    Affects Versions: 1.8
>            Reporter: Diaa
>            Priority: Minor
>             Fix For: 2.3, 1.9
>
>         Attachments: Logging file path error.patch, NUTCH-1776-v2.patch
>
>
> Currently if plugin.folder is set incorrectly there is just an IOException 
> with no details or way of knowing that this was caused by the plugin.folder 
> property.
> This is a minor patch to log as an error that the path in plugin.folder is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to