lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Slide Tao" <tao_sl...@hotmail.com>
Subject plx help for a weird problem
Date Fri, 22 Oct 2004 09:47:35 GMT
hi,

I am new to lucene. I want to build a search engine for myself, and use 
jboss(bundled with tomcat) as server. I wrote following code to do the 
index:
---------------------------code snippet---------------------------------
                   IndexWriter writer = null;
	    File root = new File(path);
	    DictionaryMgr dm = DictionaryMgr.getInstance();
	    HashMap dictionary = dm.getDictionary();
	    try {
	      String[] files = root.list();

	      if (files != null && files.length > 0) {
	        writer = new IndexWriter(path, new ChineseAnalyzer(dictionary), 
false);
	      }
	      else {
	        writer = new IndexWriter(path, new ChineseAnalyzer(dictionary), 
true); 	      }
	      writer.maxFieldLength = 1000000;
	      writer.addDocument(doc);
	    }
--------------------------code snippet---------------------------------

when I use junit to test above code, there is no problem, but if this code 
work with JBOSS, it failed, very weird.

I check the code, and found the error lies in IndexWriter.java. it is the 
following code makes the error.

private org.apache.lucene.index.SegmentInfos segmentInfos = new 
org.apache.lucene.index.SegmentInfos();

but I don't think there is coding error, maybe error from JBoss, Tomcat or 
something else? I have no idea. so plx help me.

----------------------------------------error-----------------------------------
javax.servlet.ServletException: Servlet execution threw an exception
17:42:49,857 ERROR [STDERR] 	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
17:42:49,857 ERROR [STDERR] 	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
17:42:49,857 ERROR [STDERR] 	at 
com.sungoal.brim.PermissionMonitorFilter.doFilter(PermissionMonitorFilter.java:106)
17:42:49,857 ERROR [STDERR] 	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
17:42:49,857 ERROR [STDERR] 	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
17:42:49,867 ERROR [STDERR] 	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
17:42:49,877 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
17:42:49,877 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
17:42:49,877 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
17:42:49,877 ERROR [STDERR] 	at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
17:42:49,877 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
17:42:49,877 ERROR [STDERR] 	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
17:42:49,877 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
17:42:49,877 ERROR [STDERR] 	at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
17:42:49,877 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
17:42:49,887 ERROR [STDERR] 	at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
17:42:49,897 ERROR [STDERR] 	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
17:42:49,897 ERROR [STDERR] 	at java.lang.Thread.run(Unknown Source)
17:42:49,897 INFO  [Engine] Servlet execution threw an exception

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.com/


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


Mime
View raw message