[xwiki-devs] XWiki 2.2 Lucene Plugin rebuild index fails
Hey; I am just getting up and running with XWiki but am having some issues with getting the Lucene Plugin to work. I have uncommented the following lines in WEB-INF/xwiki.cfg: #-# Lucene search engine xwiki.plugins.lucene.indexdir=/tmp/xwiki/lucene xwiki.plugins.lucene.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer xwiki.plugins.lucene.indexinterval=20 And to do diagnostics I created a new page with just these lines of code: {{velocity}} #set($results = $xwiki.lucene.rebuildIndex()) {{/velocity}} when I view the page, the macro fails. when I look at the output, i see this (reduced): org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [#set($results = $xwiki.lucene.rebuildIndex())] at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:118) at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:44) ... (hundreds more) Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'rebuildIndex' in class com.xpn.xwiki.plugin.lucene.LucenePluginApi threw exception java.lang.NullPointerException at velocity macro[line 1, column 31] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252) ...... 92 more Caused by: java.lang.NullPointerException at com.xpn.xwiki.plugin.lucene.LucenePlugin.rebuildIndex(LucenePlugin.java:146) at com.xpn.xwiki.plugin.lucene.LucenePluginApi.rebuildIndex(LucenePluginApi.java:68)... ... 98 more It seems that it is throwing a NullPointerException. This is exactly what it does when I try to rebuild the index on the XWiki provided Lucene Search page as well. Any ideas as to what I can do to solve this? Could it be a configuration error? -- View this message in context: http://n2.nabble.com/XWiki-2-2-Lucene-Plugin-rebuild-index-fails-tp4561718p4... Sent from the XWiki- Dev mailing list archive at Nabble.com.
On Fri, Feb 12, 2010 at 16:38, Jared.Scott <[email protected]> wrote:
Hey;
I am just getting up and running with XWiki but am having some issues with getting the Lucene Plugin to work. I have uncommented the following lines in WEB-INF/xwiki.cfg:
#-# Lucene search engine xwiki.plugins.lucene.indexdir=/tmp/xwiki/lucene xwiki.plugins.lucene.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer xwiki.plugins.lucene.indexinterval=20
And to do diagnostics I created a new page with just these lines of code: {{velocity}} #set($results = $xwiki.lucene.rebuildIndex()) {{/velocity}}
when I view the page, the macro fails. when I look at the output, i see this (reduced):
org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [#set($results = $xwiki.lucene.rebuildIndex())] at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:118) at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:44) ... (hundreds more) Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'rebuildIndex' in class com.xpn.xwiki.plugin.lucene.LucenePluginApi threw exception java.lang.NullPointerException at velocity macro[line 1, column 31] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252) ...... 92 more Caused by: java.lang.NullPointerException at com.xpn.xwiki.plugin.lucene.LucenePlugin.rebuildIndex(LucenePlugin.java:146) at com.xpn.xwiki.plugin.lucene.LucenePluginApi.rebuildIndex(LucenePluginApi.java:68)... ... 98 more
It seems that it is throwing a NullPointerException. This is exactly what it does when I try to rebuild the index on the XWiki provided Lucene Search page as well.
Any ideas as to what I can do to solve this? Could it be a configuration error?
Do you have any error in the log when you start XWiki ? From what i can see in the code this NullPointerException means that Lucene plugin initialization failed so some part of the plugin are still null.
-- View this message in context: http://n2.nabble.com/XWiki-2-2-Lucene-Plugin-rebuild-index-fails-tp4561718p4... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
tmortagne wrote:
Do you have any error in the log when you start XWiki ? From what i can see in the code this NullPointerException means that Lucene plugin initialization failed so some part of the plugin are still null.
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Thanks for replying. And thanks for the pointer as well! Through looking at the log i noticed that my JAVA_HOME param was pointing to a non-existing entity, so i fixed that pointer and bam! it works! Interesting that I was able to run XWiki at all without that parameter being recognized correctly... anyways, thanks much! ----- Jared M. Scott Rampgreen -- View this message in context: http://n2.nabble.com/XWiki-2-2-Lucene-Plugin-rebuild-index-fails-tp4561718p4... Sent from the XWiki- Dev mailing list archive at Nabble.com.
participants (2)
-
Jared.Scott -
Thomas Mortagne