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

InvocationTargetException: NoClassDefFoundError: org/apache/lucene/analysis/TokenStream ClassNotFoundException: org.apache.lucene.analysis.TokenStream

But when the class is called from a normal Java file <call in="" main="" method=""> Works without any problem

What caused this problem and how it can be solved ?

asked 13.12.2018 at 09:38

Wawashra's gravatar image

accept rate: 0%

Which version of ivy do you use?

(13.12.2018 at 10:05) Alex Suter ♦♦ Alex%20Suter's gravatar image

AxonIvy7.0.2 thanks

(14.12.2018 at 02:25) Wawashra Wawashra's gravatar image

how do you provide the libraries to your project? using your own libs via maven? or are accessing our internals? example would help.

(14.12.2018 at 02:42) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

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” .

(14.12.2018 at 02:43) Wawashra Wawashra's gravatar image

You should add the Lucene libs as normal libraries into your project. E.g. like this:

  • 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.
  • 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.

answered 14.12.2018 at 04:36

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
accept rate: 70%

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.

We removed those libraries from ivy class path container with ivy 7.1. See migration notes:

(14.12.2018 at 04:59) Alex Suter ♦♦ Alex%20Suter's gravatar image

Good point @Alex Suter, I forgot about the different situation on 7.0. This gives you another option @Wawashra. 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...

(17.12.2018 at 03:09) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 13.12.2018 at 09:38

Seen: 467 times

Last updated: 17.12.2018 at 03:09