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

Julien Nioche commented on NUTCH-848:
-------------------------------------

The issue I described is due to the fact that the classloader can't find the 
jars in the /lib directory of the job archive (if that makes any sense). This 
is not the case when the library is called within mapreduce as Hadoop unpacks 
everything it needs from the job and puts it in the classpath. In the case of 
the command 'nutch solrindex', the driver class has a dependency to the SOLR 
library and it cannot be found from the job.

One possible solution would be to have a classloader which would be able to 
deal with jars within jars but IMHO an even simpler one would be to modify the 
nutch script used in the deployed configuration so that it starts the job using 
"hadoop jar NUTCH.job". I will attach a patch shortly.

@Minh : your comments are interesting but (again) not related to the issue. 
Your comment is about dependencies in local mode whereas the problem I 
described is about the deployed configuration. Thanks

> Error when calling 'nutch solrindex' in deployed configuration
> --------------------------------------------------------------
>
>                 Key: NUTCH-848
>                 URL: https://issues.apache.org/jira/browse/NUTCH-848
>             Project: Nutch
>          Issue Type: Bug
>            Reporter: Julien Nioche
>            Priority: Blocker
>             Fix For: 2.0
>
>         Attachments: slf4j-simple-1.5.11.jar
>
>
> See https://issues.apache.org/jira/browse/NUTCH-843
> In a deployed environment with just bin/nutch and the job file on an 
> independent Hadoop configuration, a call to 'nutch solrindex' yields : 
> {code}
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/apache/solr/client/solrj/SolrServer
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.solr.client.solrj.SolrServer
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> Could not find the main class: org.apache.nutch.indexer.solr.SolrIndexer.  
> Program will exit.
> {code}
> Surprisingly some tasks work fine, but not this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to