lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ghazal Gharooni <ghazal.gharo...@gmail.com>
Subject Re: [ERR] Only a type can be imported
Date Mon, 07 Dec 2009 16:32:45 GMT
Thank you! I added all the jar files but accessed them as an external
jar files. Since I copied them all in WEB-INF/lib the problem has been
solved.


On Mon, Dec 7, 2009 at 1:58 AM, Ian Lea <ian.lea@gmail.com> wrote:
>
> Using google to search for "Generated servlet error: Only a type can
> be imported." leads to posts that say it is caused by your webapp not
> being able to find a jar.
>
> Double check that you've got the lucene-core-x.x.x.jar file in
> webapps/whatever/WEB-INF/lib, assuming that's the right place for
> whatever it is you are running.
>
> And double check that you don't have any old lucene jars anywhere else.
>
>
> --
> Ian.
>
>
> On Sun, Dec 6, 2009 at 6:13 PM, Ghazal Gharooni
> <ghazal.gharooni@gmail.com> wrote:
> > Hello,
> > I am new in lucene project. I got the following error while trying to run
> > the project and test Search Criteria (results.jsp) . I added all jar files
> > to class path. I notified that QueryParser accept three argument while the
> > code only includes two arguments. So, I've changed the qp = new
> > QueryParser("contents", analyzer); to this one: qp = new
> > QueryParser(Version.LUCENE_
> > CURRENT,"contents", analyzer);  However, it still doesn't work. Please
> > somebody help me to get through this issue.
> >
> >
> > ERROR:
> > ------------------------------------------
> >
> > org.apache.jasper.JasperException: Unable to compile class for JSP
> >
> > Generated servlet error:
> > Only a type can be imported.
> > org.apache.lucene.analysis.standard.StandardAnalyzer resolves to a
> > package
> >
> > Generated servlet error:
> > Only a type can be imported. org.apache.lucene.util.Version resolves
> > to a package
> >
> > An error occurred at line: 45 in the jsp file: /results.jsp
> > Generated servlet error:
> > IndexSearcher cannot be resolved or is not a type
> >
> > An error occurred at line: 45 in the jsp file: /results.jsp
> > Generated servlet error:
> > Query cannot be resolved or is not a type
> >
> > An error occurred at line: 45 in the jsp file: /results.jsp
> > Generated servlet error:
> > TopDocs cannot be resolved or is not a type
> >
> > An error occurred at line: 45 in the jsp file: /results.jsp
> > Generated servlet error:
> > IndexReader cannot be resolved or is not a type
> >
> > An error occurred at line: 45 in the jsp file: /results.jsp
> > Generated servlet error:
> > IndexReader cannot be resolved
> >
> > An error occurred at line: 45 in the jsp file: /results.jsp
> > Generated servlet error:
> > FSDirectory cannot be resolved
> >
> > An error occurred at line: 45 in the jsp file: /results.jsp
> > Generated servlet error:
> > IndexSearcher cannot be resolved or is not a type
> >
> > An error occurred at line: 77 in the jsp file: /results.jsp
> > Generated servlet error:
> > Analyzer cannot be resolved or is not a type
> >
> > An error occurred at line: 77 in the jsp file: /results.jsp
> > Generated servlet error:
> > StandardAnalyzer cannot be resolved or is not a type
> >
> > An error occurred at line: 77 in the jsp file: /results.jsp
> > Generated servlet error:
> > Version.LUCENE_CURRENT cannot be resolved or is not a type
> >
> > An error occurred at line: 77 in the jsp file: /results.jsp
> > Generated servlet error:
> > QueryParser cannot be resolved or is not a type
> >
> > An error occurred at line: 77 in the jsp file: /results.jsp
> > Generated servlet error:
> > QueryParser cannot be resolved or is not a type
> >
> > An error occurred at line: 77 in the jsp file: /results.jsp
> > Generated servlet error:
> > ParseException cannot be resolved or is not a type
> >
> > An error occurred at line: 143 in the jsp file: /results.jsp
> > Generated servlet error:
> > Document cannot be resolved or is not a type
> >
> >
> >        org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
> >        org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
> >        org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
> >        org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
> >        org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> >        org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> >        org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
> >        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
> >        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> >        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> >        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message