tags:

views:

1396

answers:

3

I am following the tutorial here:

http://nutch.sourceforge.net/docs/en/tutorial.html

Crawling works fine, as does the test search from the command line.

When I try to fire up tomcat after moving ROOT.war into place(and it unarchiving and creating a new ROOT folder during startup), I get a page with the 500 error and some errors in the Tomcat logs.

HTTP Status 500 - No Context configured to process this request

2009-02-19 15:55:46 WebappLoader[]: Deploy JAR /WEB-INF/lib/xerces-2_6_2.jar to C:\Program Files\Apache Software Foundation\Tomcat 4.1\webapps\ROOT\WEB-INF\lib\xerces-2_6_2.jar
2009-02-19 15:55:47 ContextConfig[] Parse error in default web.xml
org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable.
    at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181)
    at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
    at org.apache.commons.digester.Digester.endElement(Digester.java:1225) ............ etc.

So it looks like the root of the error is default web.xml, not in the Log4JLogger - although I know very little about Java. I did not edit the web.xml in the tomcat dir.

Anyone know what is going on here?

versions/info:

nutch 0.9

Tomcat 4.1

jre1.5.0_08

jdk1.6.0_12

NUTCH_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_12

JAVA_HOME=C:\Program Files\Java\jdk1.6.0_12

+2  A: 

In Java, applications sometimes rely on third party libraries. In this case, it appears that your Tomcat installation does not include one such library. Judging by the error you received, it appears that you are missing the Apache Commons Logging library (a commonly used library in the Java world that just so happens to not come bundled with Tomcat).

The typical way to distribute a library in Java is via a JAR (Java Archive) file. Simply put, a JAR file is simply a bunch of Java classes that have been zipped into a file that has been renamed from *.zip to *.jar.

To obtain the Commons Logging JAR file, you can download it from the Apache Commons download site. You will want the binary version, not the source version. Should you happen to download version 1.1.1 (for example), you should unzip the commons-logging-1.1.1-bin.zip file. Inside, you will find a file named commons-logging-1.1.1.jar. Copy this JAR file to the lib directory wherever your Tomcat software is installed. You may be required to restart Tomcat before it notices this new file.

Hopefully, the next time you try to use the application, you may or may not receive yet another error indicating that yet another class cannot be found. In that case, I welcome you to the wonderful world of JAR hunting! :) Hopefully the application will not require too many libraries above and beyond Commons Logging, but we will see (considering you're trying to run Nutch, I can foresee it requiring Lucene, so be prepared for that).

Have fun with Nutch!

Adam Paynter
Nice explanation - I'll give that a try.
Sam
The error .jar api ended up being there, but I dropped the other jars in there. Didn't seem to help at all. Thanks for the suggestions.
Sam
+1  A: 

For me that tells that it can't find the logger which is reported as a parse error itself. A bit odd or disinformant way to express it, I guess. Anyway, I think you need to add the Commons Logging .jar to your libraries (WEB-INF/lib) and restart Tomcat and then it should work.

Also your Tomcat seems to be ancient, if possible I'd recommend getting 5.5.x or 6.x.

Esko
This answer got me moving along. Now the search doesn't return any results, but at least the search page comes up.
Sam
A: 

if you found to have required .jar existing in application, than solution to your problem might be to:

  1. Stop Tomcat
  2. go to %TOMCAT_HOME%/work an erase everything inside

this 'work' folder, as its name says, contains classes used for work, sometimes access to some of these files can be blocked for any reason. When I get such message this is first thing to do. Most of the time it works...