Hi Jack,
I had the same problem while running the tutorial. The trick is to launch
your catalina.sh start command from the same directory that contains your
db and segments file. I also used a absolute path to start the
catalina.sh script.
BTW, the only other environment variable I have set is JAVA_HOME I am sure
there are other solutions as well.
Vikas
----------------------------------------------------------
Jack Pack wrote:
Running under XP Pro, Tomcat 4.1, root.war (nutch-0.5) with the segments
directory sitting at TOMCAT_HOME. I get a NullPointerException when
initiating a search.
The tomcat webpage trace:
java.lang.NullPointerException
at net.nutch.searcher.NutchBean.init(NutchBean.java:82)
Here is the tomcat console trace:
041104 200332 12 creating new bean
041104 200332 12 opening segment indexes in C:\Tomcat4.1\segments
That trace says that NutchBean was looking in the right place, and is
generated by the following code snippet from NutchBean:
LOG.info("opening segment indexes in "
segmentsDir.getCanonicalPath());
Vector vDirs=new Vector();
File [] directories = segmentsDir.listFiles();
for(int i = 0; i < segmentsDir.listFiles().length; i++) {
And the error is happening inside the for-loop.
BTW: if you have File [] directories already filled by
segmentsDir.listFiles();
then, why do you keep running that same code segmentsDir.listFiles()with
.length inside the for-loop when you could have used code like
//TODO opportunity to test for null here
int len = directories.length;
for(int i=0;i<len;i++)
That same code is in the latest cvs code as well. What am I missing here?
Meanwhile, the console trace says it was looking inside the proper
directory, and, in there, there are three directories:
20041104185455
20041104185834
20041104190247
Any thoughts on the NullPointerException?
TIA
Jack
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Nutch-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nutch-developers