cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Coboos <cromo...@gmx.net>
Subject LuceneSearchGenerator: NullPointerException if query contains a blank
Date Sun, 23 May 2004 16:15:08 GMT
Hello,

I'am trying the LuceneSearchGenerator of the cocoon samples to search 
for a pattern passed to the generator via the parameter "queryString" 
but if this query string contains a blank " " or a special character 
like (, ) ", ! a NullPointerException will be thrown. Why? What can I do 
to avoid this exception? Is it a bug? Thank you.

The full exception:

Original Exception: java.lang.NullPointerException at 
org.apache.cocoon.www.samples.lucene.search_index_xsp.generate(org.apache.cocoon.www.samples.lucene.search_index_xsp:1087)

at 
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:263)

at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581)

at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:196)

at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:525)

at 
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:155)

at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)

at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)

at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)

at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)

at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371) 
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)

at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)

at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)

at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)

at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371) 
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)

at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)

at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)

at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)

at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)

at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371) 
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312) 
at org.apache.cocoon.Cocoon.process(Cocoon.java:656) at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)

at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)

at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257) 
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) 
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)

at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) 
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184) 
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) 
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) 
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156) 
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) 
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) 
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) 
at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) 
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833) 
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)

at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619) 
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688) 
at java.lang.Thread.run(Thread.java:534)

Mime
View raw message