<?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>Mon, 17 Dec 2018 03:09:06 -0500</lastBuildDate><item><title>Comment by Reguel Wermelinger on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/3580/lucene-library-error#3589</link><description>&lt;p&gt;Good point &lt;a href="https://answers.axonivy.com/users/710/alex-suter"&gt;&lt;a href="https://answers.axonivy.com/users/710/alex-suter"&gt;@Alex Suter&lt;/a&gt;&lt;/a&gt;, I forgot about the different situation on 7.0. 
This gives you another option &lt;a href="https://answers.axonivy.com/users/1144/wawashra"&gt;&lt;a href="https://answers.axonivy.com/users/1144/wawashra"&gt;@Wawashra&lt;/a&gt;&lt;/a&gt;. Just migrate to a leading edge engine (7.2.1) and are free to use any Lucene library version without the need to be compliant with our core...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 17 Dec 2018 03:09:06 -0500</pubDate><guid>https://answers.axonivy.com/questions/3580/lucene-library-error#3589</guid></item><item><title>Comment by Alex Suter on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/3580/lucene-library-error#3586</link><description>&lt;p&gt;I suppose that he has to use exactly the same version as we use it in the core with 7.0.x 
Because lucene libraries are part of the ivy class path container.&lt;/p&gt;
&lt;p&gt;We removed those libraries from ivy class path container with ivy 7.1. See migration notes:
&lt;a href="https://developer.axonivy.com/releases/ivy/latest/documents/doc/migrationNotes/MigrationNotes.html"&gt;https://developer.axonivy.com/releases/ivy/latest/documents/doc/migrationNotes/MigrationNotes.html&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Fri, 14 Dec 2018 04:59:51 -0500</pubDate><guid>https://answers.axonivy.com/questions/3580/lucene-library-error#3586</guid></item><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><item><title>Comment by Wawashra on Wawashra's question</title><link>https://answers.axonivy.com/questions/3580/lucene-library-error#3584</link><description>&lt;p&gt;by add jar file to this folder “PROJECT_NAME\webContent\WEB-INF\lib”, or  used the  default library  in this path “AxonIvy7.0.2\configuration\org.eclipse.osgi\5\0.cp\lib\mvn” .&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wawashra</dc:creator><pubDate>Fri, 14 Dec 2018 02:43:39 -0500</pubDate><guid>https://answers.axonivy.com/questions/3580/lucene-library-error#3584</guid></item><item><title>Comment by Reguel Wermelinger on Wawashra's question</title><link>https://answers.axonivy.com/questions/3580/lucene-library-error#3583</link><description>&lt;p&gt;how do you provide the libraries to your project? using your own libs via maven? or are accessing our internals?
...an example would help.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 14 Dec 2018 02:42:13 -0500</pubDate><guid>https://answers.axonivy.com/questions/3580/lucene-library-error#3583</guid></item><item><title>Comment by Wawashra on Wawashra's question</title><link>https://answers.axonivy.com/questions/3580/lucene-library-error#3582</link><description>&lt;p&gt;AxonIvy7.0.2
thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wawashra</dc:creator><pubDate>Fri, 14 Dec 2018 02:25:46 -0500</pubDate><guid>https://answers.axonivy.com/questions/3580/lucene-library-error#3582</guid></item><item><title>Comment by Alex Suter on Wawashra's question</title><link>https://answers.axonivy.com/questions/3580/lucene-library-error#3581</link><description>&lt;p&gt;Which version of ivy do you use?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Thu, 13 Dec 2018 10:05:07 -0500</pubDate><guid>https://answers.axonivy.com/questions/3580/lucene-library-error#3581</guid></item></channel></rss>