You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Paul Rogers <pa...@gmail.com> on 2011/03/14 19:42:51 UTC

Unable to build nutch svn - can't locate InjectorJob class

Dear All

I'm having trouble building nutch from the trunk svn.  Having built it
using ant when I issue the command src/bin/nutch inject crawl/crawldb
urls  I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/nutch/crawl/InjectorJob
Caused by: java.lang.ClassNotFoundException: org.apache.nutch.crawl.InjectorJob
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: org.apache.nutch.crawl.InjectorJob.
Program will exit.

I've checked and the InjectorJob.class file exists in
$NUTCH_HOME/build/classes/org/apache/nutch/crawl/ and I've tried
various classpaths including ., $NUTCH_HOME/build/classes &
$NUTCH_HOME/build/classes/org/apache/nutch/crawl but still get the
same error message.

I notice in the binary version contained in version 1.2 neither the
class files nor the error exists.

Am I using the wrong class path or has the build failed in some way?

The instructions for building say "check out the latest source code
from subversion and build it with Ant".  Is there more to it than just
issuing the ant command in the $NUTCH_HOME directory?

Many thanks

Paul

Re: Unable to build nutch svn - can't locate InjectorJob class

Posted by Markus Jelsma <ma...@openindex.io>.
Are you actually running bin/nutch from NUTCH_HOME directory? If i'm not 
mistaken, the script sets its own NUTCH_HOME.

If you, for example, built Nutch in /opt/nutch/branch-1.2/ you should execute 
bin/nutch from /opt/nutch/branch-1.2.

> Dear All
> 
> I'm having trouble building nutch from the trunk svn.  Having built it
> using ant when I issue the command src/bin/nutch inject crawl/crawldb
> urls  I get the following error:
> 
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/nutch/crawl/InjectorJob
> Caused by: java.lang.ClassNotFoundException:
> org.apache.nutch.crawl.InjectorJob at
> java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> Could not find the main class: org.apache.nutch.crawl.InjectorJob.
> Program will exit.
> 
> I've checked and the InjectorJob.class file exists in
> $NUTCH_HOME/build/classes/org/apache/nutch/crawl/ and I've tried
> various classpaths including ., $NUTCH_HOME/build/classes &
> $NUTCH_HOME/build/classes/org/apache/nutch/crawl but still get the
> same error message.
> 
> I notice in the binary version contained in version 1.2 neither the
> class files nor the error exists.
> 
> Am I using the wrong class path or has the build failed in some way?
> 
> The instructions for building say "check out the latest source code
> from subversion and build it with Ant".  Is there more to it than just
> issuing the ant command in the $NUTCH_HOME directory?
> 
> Many thanks
> 
> Paul