Nutch, Tomcat, and Java, OH MY!

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
isara
Posts: 1
Joined: 2007-05-01 17:55

Nutch, Tomcat, and Java, OH MY!

#1 Post by isara »

Hello everyone,

I'm a newbie to the forum and to Linux Debian so please speak slowly and use small words so I can understand. lol

I recently installed Debian Etch, the latest JVM, Tomcat 5.5, and Nutch 0.9. Afterwards Nutch was able to crawl, index, and do a successful search via the terminal console. BUT when trying to do a search from the Nutch search page (localhost:8180) it gives the following error.

Code: Select all

HTTP Status 500 -
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Exception in JSP: /search.jsp:66

63: --%>
64: 
65: <%
66:   NutchBean bean = NutchBean.get(application, nutchConf);
67:   // set the character encoding to use when interpreting request values 
68:   request.setCharacterEncoding("UTF-8");
69: 


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
	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:275)
	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

root cause

java.lang.RuntimeException: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks)
	org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:80)
	org.apache.hadoop.fs.FileSystem.get(FileSystem.java:159)
	org.apache.hadoop.fs.FileSystem.getNamed(FileSystem.java:119)
	org.apache.hadoop.fs.FileSystem.get(FileSystem.java:91)
	org.apache.nutch.searcher.NutchBean.<init>(NutchBean.java:95)
	org.apache.nutch.searcher.NutchBean.<init>(NutchBean.java:84)
	org.apache.nutch.searcher.NutchBean.get(NutchBean.java:71)
	org.apache.jsp.search_jsp._jspService(search_jsp.java:106)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
	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:275)
	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
All that looks like a foreign language to a noob, so any help in translating it would really be appreciated.

Here's some information that might be needed.
- The search page is located in: /usr/share/tomcat5.5-webapps/ROOT
- The Nutch crawl databases are located in: /usr/local/nutch/crawl

Thanks in advance for any help you can provide.
-pk

AJxn
Posts: 56
Joined: 2006-07-30 17:21
Location: Gävle, Sweden

#2 Post by AJxn »

You need to tell tomcat and java that you web aplication is allowed to read files outside of your tomcat directories.

That you can do by add a file in /etc/tomcat5.5/policy.d/
File /etc/tomcat5.5/policy.d/50user.policy is a good example. Copy to 55Nutch.policy and restart aplication or tomcat

Code: Select all

sudo invoce-rc.d tomcat5.5 restart
You could also turn java security of, but that is bad unless you developing on your machine and it not connected to internet.
Please read /usr/share/doc/tomcat5.5/README.Debian

Post Reply