Thanks Otis.

I thought it was a classpath issue as well, but it actually appears to be a
permissions issue.  At least, turning off the SecurityManager fixes the
problem.  This seems pretty sub-optimal to me, but I have yet to figure out
what permission I need to grant in order to leave the SecurityManager on
while having it work.

Best,
John

On Mon, Jun 16, 2008 at 8:28 PM, Otis Gospodnetic <[EMAIL PROTECTED]>
wrote:

> Yes, this is a pure CLASSPATH issue.  I haven't built a Nutch war in a
> while, so I don't recall what is in it, but most likely it has WEB-INF/lib
> directory with some jar files.  One of these .... ah, let's just see.  Here:
>
> [EMAIL PROTECTED] trunk]$ unzip -l build/nutch-1.0-dev.war | grep jar | grep
> -v plugin
>   125955  08-03-06 22:55   WEB-INF/lib/commons-cli-2.0-SNAPSHOT.jar
>   207723  09-10-05 11:34   WEB-INF/lib/commons-lang-2.1.jar
>    34242  03-28-07 00:02   WEB-INF/lib/commons-logging-1.0.4.jar
>    26202  07-16-05 13:59   WEB-INF/lib/commons-logging-api-1.0.4.jar
>  1707358  02-18-08 00:55   WEB-INF/lib/hadoop-0.16.0-core.jar
>   358180  06-27-06 11:55   WEB-INF/lib/log4j-1.2.13.jar
>   664675  02-18-08 00:55   WEB-INF/lib/lucene-core-2.3.0.jar
>    48567  02-18-08 00:55   WEB-INF/lib/lucene-misc-2.3.0.jar
>    29558  07-16-05 13:59   WEB-INF/lib/taglibs-i18n.jar
>   113156  02-18-08 00:55   WEB-INF/lib/tika-0.1-incubating.jar
>   124724  07-16-05 13:59   WEB-INF/lib/xerces-2_6_2-apis.jar
>  1010675  07-16-05 13:59   WEB-INF/lib/xerces-2_6_2.jar
>   550411  06-16-08 22:17   WEB-INF/lib/nutch-1.0-dev.jar
>
>
> Note this last jar.  That's what you'll want to have, because that has
> CommonGrams:
>
> [EMAIL PROTECTED] trunk]$ unzip build/nutch-1.0-dev.jar | grep Common
>  inflating: org/apache/nutch/analysis/CommonGrams$ArrayTokens.class
>  inflating: org/apache/nutch/analysis/CommonGrams$Filter.class
>  inflating: org/apache/nutch/analysis/CommonGrams.class
>  inflating: org/apache/nutch/metadata/CreativeCommons.class
>
> I built my Nutch war with "ant war".
>
>
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
> ----- Original Message ----
> > From: John Thompson <[EMAIL PROTECTED]>
> > To: [email protected]
> > Sent: Monday, June 16, 2008 3:48:56 PM
> > Subject: ClassNotFoundException: org.apache.nutch.analysis.CommonGrams
> >
> > Hi,
> >
> > I've been trying to debug this problem for the past few days in my
> recently
> > set up Nutch installation.  Essentially, the main page, about page, and
> help
> > page are fine, but as soon as I try to submit a search query, I get the
> > following stack trace (sorry for the length):
> >
> > *exception*
> >
> > org.apache.jasper.JasperException: org/apache/nutch/analysis/CommonGrams
> >
> >
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
> >
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
> >
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> >     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >     sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >     java.lang.reflect.Method.invoke(Method.java:597)
> >
> org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
> >     java.security.AccessController.doPrivileged(Native Method)
> >     javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
> >
> org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
> >
> >
> org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
> >
> > *root cause*
> >
> > javax.servlet.ServletException: org/apache/nutch/analysis/CommonGrams
> >
> >
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
> >
> >
> org.apache.jasper.runtime.PageContextImpl.access$11(PageContextImpl.java:779)
> >
> org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:761)
> >     java.security.AccessController.doPrivileged(Native Method)
> >
> >
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:759)
> >     org.apache.jsp.search_jsp._jspService(search_jsp.java:777)
> >     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
> >
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> >     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >     sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >     java.lang.reflect.Method.invoke(Method.java:597)
> >
> org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
> >     java.security.AccessController.doPrivileged(Native Method)
> >     javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
> >
> org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
> >
> >
> org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
> >
> > *root cause*
> >
> > java.lang.NoClassDefFoundError: org/apache/nutch/analysis/CommonGrams
> >
> >
> org.apache.nutch.searcher.FieldQueryFilter.setConf(FieldQueryFilter.java:108)
> >
> org.apache.nutch.searcher.url.URLQueryFilter.setConf(URLQueryFilter.java:34)
> >
> org.apache.nutch.plugin.Extension.getExtensionInstance(Extension.java:162)
> >     org.apache.nutch.searcher.QueryFilters.(QueryFilters.java:76)
> >     org.apache.nutch.searcher.IndexSearcher.init(IndexSearcher.java:79)
> >     org.apache.nutch.searcher.IndexSearcher.(IndexSearcher.java:63)
> >     org.apache.nutch.searcher.NutchBean.init(NutchBean.java:140)
> >     org.apache.nutch.searcher.NutchBean.(NutchBean.java:106)
> >     org.apache.nutch.searcher.NutchBean.(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:98)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
> >
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> >     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >     sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >     java.lang.reflect.Method.invoke(Method.java:597)
> >
> org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
> >     java.security.AccessController.doPrivileged(Native Method)
> >     javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
> >
> org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
> >
> >
> org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
> >
> > Could this be a classpath problem?  My setup may be a little peculiar.
>  My
> > site information is located at:
> >
> > /usr/share/tomcat5.5-webapps/site_name
> >
> > But I've appropriately specified that as the docBase at:
> >
> > /usr/share/tomcat5.5/conf/Catalina/localhost/site_name.xml
> >
> > so that shouldn't be a problem.
> >
> > Inside
> >
> > /usr/share/tomcat5.5-webapps/site_name
> >
> > I've just unpacked nutch-0.9.war, which I got from the tarball at the
> Nutch
> > site.  The only modifications I've made there are related to doctype
> issues
> > because a few of the xml files were apparently incompatible with Java 6.
> > That should be irrelevant to the current problem.
> >
> > So I guess the question is where is Nutch expecting to find
> > CommonGrams.class?
> >
> > Best,
> > John
>
>

Reply via email to