<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: lucene library error</title><link>https://answers.axonivy.com/questions/3580/lucene-library-error</link><description>&lt;p&gt;After you build a java class  depending on the Lucene  library , And call this class of processes element "Script"  inside processes It does not work and shows me the following error&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;InvocationTargetException: 
NoClassDefFoundError: org/apache/lucene/analysis/TokenStream
ClassNotFoundException: org.apache.lucene.analysis.TokenStream&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But when the class is called from a normal Java file &amp;lt;call in="" main="" method=""&amp;gt;
Works without any problem &lt;/p&gt;
&lt;p&gt;What caused this problem and how it can be solved ? &lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3580/lucene-library-error" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 14 Dec 2018 04:36:53 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/3580/lucene-library-error/3585</link><description>&lt;p&gt;You should add the Lucene libs as normal libraries into your project. E.g. like this: &lt;a href="https://answers.axonivy.com/questions/2089/add-library-with-pom-xml"&gt;https://answers.axonivy.com/questions/2089/add-library-with-pom-xml&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;adding them to WEB-INF/lib seems wrong to me. You would only put it there if some a primefaces impl would require it there.&lt;/li&gt;
&lt;li&gt;using the ivy.core internals jars is also not recommend. They are designed for internals that work in the OSGi context. But not in projects. And its meant to be like that. You should be free to use the lucene version you prefer without being bound to our internals.&lt;/li&gt;
&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 14 Dec 2018 04:36:53 -0500</pubDate><guid>https://answers.axonivy.com/questions/3580/lucene-library-error/3585</guid></item></channel></rss>