[opencms-dev] NullPointerException on search indexing

Graeme Kidd coolkidd3 at hotmail.com
Wed May 26 17:23:09 CEST 2010



Hi Again,

After browsing through the OpenCms source code and getting a better understanding of how Lucene worked I managed to fix this issue. I just needed to define an en_GB analszer in opencms-search.xml:
<analyzer>
    <class>org.apache.lucene.analysis.standard.StandardAnalyzer</class>
    <locale>en_GB</locale>
</analyzer>

At the moment its the same one used as "en" but I see no reason why en_GB is that different that it requires its own analser.

Thanks

----------------------------------------
> From: coolkidd3 at hotmail.com
> To: opencms-dev at opencms.org
> Date: Wed, 26 May 2010 15:13:53 +0100
> Subject: [opencms-dev] NullPointerException on search indexing
>
>
> Hi,
>
> While I was setting up the search index for my site I noticed I was getting NullPointerException's whenever OpenCms tried to index a file.
>
> Since my content is written in en_GB I had to edit the opencms-search.xml file so that it wouldn't skip files written in en_GB. This is all that I have changed:
>
> 
>     Offline project EN (VFS)
>     offline
>     Offline
>     en_GB
>     standard
>     
>         source1
>     
> 
>
> Which results in this error for every file set to be indexed:
>
> 26 May 2010 15:11:17,318  INFO [rg.opencms.report.CmsLogReport: 123] ( 1 ) Indexing file /sites/default/demo_en/intro.html ... !!! failed !!!
> 26 May 2010 15:11:17,318  INFO [rg.opencms.report.CmsLogReport: 123] !!!  java.lang.NullPointerException  !!!
> 26 May 2010 15:11:17,318 ERROR [encms.search.CmsIndexingThread: 187] Failed to index file /sites/default/demo_en/intro.html on search index "Offline project EN (VFS)".
> java.lang.NullPointerException
>     at org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:117)
>     at org.apache.lucene.index.DocFieldConsumersPerField.processFields(DocFieldConsumersPerField.java:36)
>     at org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProcessorPerThread.java:234)
>     at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:765)
>     at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:748)
>     at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:2047)
>     at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:2024)
>     at org.opencms.search.CmsIndexingThread.run(CmsIndexingThread.java:149)
> 26 May 2010 15:11:17,412  INFO [rg.opencms.report.CmsLogReport: 123] [ ... finished updating search index "Offline project EN (VFS)" ]
>
> Any idea whats going on or how to fix this?
>
> Thanks,
> Graeme
>
>
> _________________________________________________________________
> http://clk.atdmt.com/UKM/go/195013117/direct/01/
> We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
 		 	   		  
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now


More information about the opencms-dev mailing list