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

Wawashra
(suspended)
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? ...an 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: https://answers.axonivy.com/questions/2089/add-library-with-pom-xml

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

answered 14.12.2018 at 04:36

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
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: https://developer.axonivy.com/releases/ivy/latest/documents/doc/migrationNotes/MigrationNotes.html

(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

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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

Tags:

×147
×2

Asked: 13.12.2018 at 09:38

Seen: 1,334 times

Last updated: 17.12.2018 at 03:09