I suggest you start Nutch/Hadoop and observe what classpath it uses and then mimic that. Adding /hm/vineetg/jdk1.6.0_03/bin to classpath is wrong/not needed.
However, you can see "java.lang.ClassNotFoundException: java.net.URI" in there. So "URI" class, a part of the JDK/JRE cannot be found. Something there smells like a problem with your java installation, not just a pure classpath issue. Can't tell without looking. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- > From: Vineet Garg <[EMAIL PROTECTED]> > To: [email protected] > Sent: Thursday, May 8, 2008 12:18:05 AM > Subject: Re: Nutch Exception > > Hi, > I am using jdk1.6.0_03. > JAVA_HOME is /hm/vineetg/jdk1.6.0_03/ > I have not set the class path. The code is in the same dir which > contains the hadoop and nutch jar files. > If i set class path to /hm/vineetg/jdk1.6.0_03/bin and compile code by > following command(from the same dir containing code and hadoop, nutch > classes): > $ javac Test.java > Then it does not pick up hadoop and nutch classes and throw errors. So I > had to unset the classpath. After that code is compiled successfully > but throws exception when i try to run it. > > Vineet > > > [EMAIL PROTECTED] wrote: > > Vineet, > > > > This looks like a JVM/CLASSPATH problem... > > Which JVM are you using, is your CLASSPATH correct, what's in JAVA_HOME? > > > > Otis > > -- > > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > > > ----- Original Message ---- > > > >> From: Vineet Garg > >> To: [email protected] > >> Sent: Wednesday, May 7, 2008 2:24:03 AM > >> Subject: Nutch Exception > >> > >> Hi, > >> > >> I have crawled and indexed the local filesystem by using nutch 0.9. Then > >> i tried to run the following code just to test the nutch search: > >> > >> import org.apache.nutch.searcher.*; > >> import org.apache.nutch.util.*; > >> import org.apache.hadoop.conf.Configuration; > >> import org.apache.hadoop.fs.Path; > >> import java.io.*; > >> class Test{ > >> public static void main(String arg[])throws IOException{ > >> IndexSearcher IS; > >> Configuration conf; > >> Path oPath = new Path("/hm/vineetg/nutch-0.9/crawl_test"); > >> conf = NutchConfiguration.create(); > >> IS = new IndexSearcher(oPath, conf); > >> //Construct query > >> Query newQuery = Query.parse("search_query", conf); > >> Hits hits = IS.search(newQuery, 300, null, null, false); > >> int TotalResults = (int)hits.getTotal(); > >> for (int iCounter = 0; iCounter < TotalResults; iCounter++) > >> { > >> Hit hit = hits.getHit(iCounter); > >> HitDetails details = IS.getDetails(hit); > >> String sTitle = details.getValue("title"); > >> String sURL = details.getValue("url"); > >> } > >> } > >> } > >> > >> But it is throwing following exception: > >> > >> Exception in thread "main" java.lang.InternalError: unexpected exception > >> during linking: java.lang.ClassNotFoundException: java.net.URI > >> at 0x005d5ca3: java.lang.Throwable.Throwable(java.lang.String) > >> (/usr/lib/./libgcj.so.3) > >> at 0x005c8b1e: java.lang.Error.Error(java.lang.String) > >> (/usr/lib/./libgcj.so.3) > >> at 0x005d6086: > >> java.lang.VirtualMachineError.VirtualMachineError(java.lang.String) > >> (/usr/lib/./libgcj.so.3) > >> at 0x005ca4be: > >> java.lang.InternalError.InternalError(java.lang.String) > >> (/usr/lib/./libgcj.so.3) > >> at 0x005c7c12: java.lang.ClassLoader.resolveClass0(java.lang.Class) > >> (/usr/lib/./libgcj.so.3) > >> at 0x005b33fc: java.lang.Class.initializeClass() > >> (/usr/lib/./libgcj.so.3) > >> at 0x0059d882: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) > >> (/usr/lib/./libgcj.so.3) > >> at 0x0059df64: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw, > >> _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3) > >> at 0x0059b474: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw, > >> void) (/usr/lib/./libgcj.so.3) > >> at 0x006efe6c: ?? (??:0) > >> at 0x005afd68: gnu.gcj.runtime.FirstThread.call_main() > >> (/usr/lib/./libgcj.so.3) > >> at 0x00619e91: gnu.gcj.runtime.FirstThread.run() > >> (/usr/lib/./libgcj.so.3) > >> at 0x005bcaec: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/./libgcj.so.3) > >> at 0x0058982c: _Jv_RunMain(java.lang.Class, byte const, int, byte > >> const, boolean) (/usr/lib/./libgcj.so.3) > >> at 0x08048930: ?? (??:0) > >> at 0x0012979d: __libc_start_main (/lib/tls/libc.so.6) > >> at 0x080486e1: ?? (??:0) > >> > >> Files are indexed at /hm/vineetg/nutch-0.9/crawl_test. > >> > >> Does anybody have any idea why it is throwing this exception?? > >> > >> Regards, > >> Vineet Garg > >> > > > > > >
