在测试lucene自带的jsp时,出现下面问题,本来测试一切正常的。。
exception
javax.servlet.ServletException: Could not initialize class org.apache.lucene.index.SegmentReader
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.results_jsp._jspService(results_jsp.java:307)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NoClassDefFoundError: Could not initialize class org.apache.lucene.index.SegmentReader
org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:155)
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:579)
org.apache.lucene.index.IndexReader.open(IndexReader.java:179)
org.apache.lucene.index.IndexReader.open(IndexReader.java:131)
org.apache.lucene.search.IndexSearcher. <init> (IndexSearcher.java:43)
org.apache.jsp.results_jsp._jspService(results_jsp.java:145)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
索引和路径都是正确的。。。。
建索引: java org.apache.lucene.demo.IndexHTML -create -index E://opt/ ..
------解决方案--------------------没遇过,up