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-tp4561718p4561718.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to