求解lucence 问题
我的lucence 索引,搜索代码 在eclipse 平台下,可以执行通过, 但通过web浏览器,执行的结果是:
javax.servlet.ServletException: -1
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
java.lang.ArrayIndexOutOfBoundsException: -1
java.util.ArrayList.get(ArrayList.java:324)
org.apache.lucene.index.FieldInfos.fieldInfo(FieldInfos.java:155)
org.apache.lucene.index.FieldInfos.fieldName(FieldInfos.java:151)
org.apache.lucene.index.SegmentTermEnum.readTerm(SegmentTermEnum.java:149)
org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:115)
org.apache.lucene.index.TermInfosReader.readIndex(TermInfosReader.java:86)
org.apache.lucene.index.TermInfosReader.<init>(TermInfosReader.java:45)
org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:112)
org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:89)
org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:118)
org.apache.lucene.store.Lock$With.run(Lock.java:109)
org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
org.apache.lucene.index.IndexReader.open(IndexReader.java:95)
lucence03.Search.searchFiles(Search.java:50)
lucence03.SearchAction.execute(SearchAction.java:17)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
--------------------编程问答-------------------- 建议加上log4j,然后在eclipse下启动,这样就可以看错误日志,就可以知道具体是哪里出了问题,页面上显示的信息不能准确定位出错代码的~ --------------------编程问答-------------------- org.apache.lucene.index.FieldInfos.fieldInfo(FieldInfos.java:155)
这个看过没
补充:企业软件 , 中间件