Funny ... I downloaded the 0.9 release of nutch and common-terms.utf8 is
not in the nutch.jar file (just to be helpful -- I don't actually use
it). I couldn't find common-terms.utf8 anywhere in the .jar file. I
would recommend asking on a nutch user list and be specific with regard
to what version you are using. Mailing lists for nutch can be found at
http://lucene.apache.org/nutch/mailing_lists.html
--David
Björn Wilmsmann wrote:
Hello everybody,
I have run into a rather weird problem that occurs when deploying a
web app - which by the way is a Grails (http://grails.codehaus.org)
app - as a WAR file in Tomcat. My app makes use of Nutch and
instantiates a NutchDocumentAnalyzer during startup as a Spring
resource. The Nutch classes and config files are loaded from a JAR
inside the lib directory of the app.
All of this works fine when running the app via the 'grails run-app'
command supplied by Grails. However, when running the app under Tomcat
from a WAR I get the following stacktrace (excerpt):
Caused by: org.springframework.beans.BeanInstantiationException: Could
not instantiate bean class
[org.apache.nutch.analysis.NutchDocumentAnalyzer]: Constructor threw
exception; nested exception is java.lang.NullPointerException
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:98)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:233)
... 63 more
Caused by: java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:61)
at java.io.BufferedReader.<init>(BufferedReader.java:76)
at java.io.BufferedReader.<init>(BufferedReader.java:91)
at org.apache.nutch.analysis.CommonGrams.init(CommonGrams.java:152)
at org.apache.nutch.analysis.CommonGrams.<init>(CommonGrams.java:52)
at
org.apache.nutch.analysis.NutchDocumentAnalyzer$ContentAnalyzer.<init>(NutchDocumentAnalyzer.java:64)
at
org.apache.nutch.analysis.NutchDocumentAnalyzer.<init>(NutchDocumentAnalyzer.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:83)
... 65 more
This is caused by the common-terms.utf8 file not being found in line
152 of org.apache.nutch.analysis.CommonGrams. However, this file is
located on the root level of the nutch.jar in the lib directory that
also contains the classes themselves. I have also tried copying the
file to TOMCAT/webapps/MY_APP/WEB-INF/classes,
TOMCAT/webapps/MY_APP/WEB-INF/ and TOMCAT/webapps/MY_APP/WEB-INF/lib,
all to no avail.
Does anybody have an idea what this could possibly be caused by?
--
Best regards,
Bjoern Wilmsmann
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]