You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Jayant Kumar Gandhi <ja...@gmail.com> on 2007/01/28 13:10:01 UTC
Error while accessing Nutch from browser/tomcat, command-line works fine
Hi Folks,
I am following the Nutch tutorial
http://lucene.apache.org/nutch/tutorial.html and trying to install
Nutch-0.7.2 on Ubuntu. I have also seen the wiki entry for getting
Nutch running on Ubuntu and followed all the steps.
The search works fine if I give the command:
bin/nutch org.apache.nutch.searcher.NutchBean query
If I access it via the browser I get the following error when I
search. The below error is for opensearch, but the searching using
search.jsp also gives a similar error.
I have edited the nutch-site.xml properly to point searcher.dir to the
right place.
Please help.
====ERROR====
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
javax.servlet.ServletException
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:290)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)
root cause
java.lang.NoClassDefFoundError
org.apache.nutch.searcher.OpenSearchServlet.init(OpenSearchServlet.java:61)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)
note The full stack trace of the root cause is available in the Apache
Tomcat/5.0 logs.
Apache Tomcat/5.0
--
www.jkg.in | http://www.jkg.in/contact-me/
Jayant Kr. Gandhi
Re: Error while accessing Nutch from browser/tomcat, command-line works fine
Posted by Justin Hartman <jj...@gmail.com>.
Your problem is the same as any Debian based system. I had this
problem, another user had a similar problem a few days ago and now
you.
Debian/Ubuntu tighten up Tomcat permissions which are a nightmare to
try and fix. However this solution below will probably get you up and
running.
First locate your 04webapps.policy file
The path to the file is most likely:
/etc/tomcat5/policy.d/04webapps.policy
If you're using tomcat 5.5 it's:
/etc/tomcat5.5/policy.d/04webapps.policy
In your 04webapps.policy file add the following at the end of the file
before the closing bracket i.e. }
// Debian hack for nutch
permission java.util.logging.LoggingPermission "control", "";
permission java.io.FilePermission "./*", "read,write,execute,delete";
permission java.util.PropertyPermission "user.dir", "read";
permission java.util.PropertyPermission "disableLuceneLocks", "read";
permission java.util.PropertyPermission "java.io.tmpdir", "read";
permission java.util.PropertyPermission "org.apache.*", "read";
permission java.io.FilePermission "/-", "read,write,execute,delete";
permission java.lang.RuntimePermission "createClassLoader", "";
Save the file, restart tomcat and then restart catalina.
This should solve this problem. If you still have the same problem add
the following line to the 04webapps.policy file:
permission java.security.AllPermission;
Once done restart all as described above.
On some systems the first hack will be suffice however there are some
setups that require the AllPermission directive.
Hope this helps.
--
Regards
Justin Hartman
PGP Key ID: 102CC123