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/15 11:58:42 UTC

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

Hi Markus

Many thanks for the reply

I have nutch installed in /opt/nutch/trunk but the nutch executable
was in src/bin so I was issuing the command src/bin/nutch inject
crawl/crawldb urls from this directory (/opt/nutch/trunk).  I think
this is in fact what you are suggesting I should be doing (all good so
far).

After a buit of fidlling araound I discovered anoth copy of the nutch
executable in runtime/deploy/bin and issuing the command
runtime/deploy/bin/nutch inject crawl/crawldb urls fixes this problem
(tho it then introduces yet another problem :-)

Many thanks for your help.

Regards

Paul

On 14 March 2011 18:42, Markus Jelsma <ma...@openindex.io> wrote:
>
> 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