Hi everybody,

In my project in designer 7.0.8 I've Axon.ivy Libraries who are available.

Like commons-io-2.5.jar from apache.

I'm using a class from this jar, in designer it works fine.

But when I'm starting my project into the engine I get a classpath exception.

I searched into the Engine documentation and plugins / lib - this jar is not present.

How can I solve this problem? and why are not all the Axon.ivy libraries who are in Designer in the classpath not present in the Engine? What should we do, manually copy all the jars into the engine and add them into the classpath or as a plugins? in version 6 there were available.

It's weird because now we have Axon.ivy Libraries (who are provided in all projects) and optional classpaths to add like Axis or Drools libraries. All the libraries contained into the optional classpaths are present in the Engine plugins directory. But the Axon.ivy Libraries who are automatically available in the Designer without adding extra classpath containers are not all available... It sounds so weird to me...

Thanks for the information and cheers, Axon Ivy Developer

asked 17.10 at 03:05

AxonIvyDeveloper's gravatar image

AxonIvyDevel...
145
accept rate: 0%

edited 05.11 at 06:35

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
1.1k6381103

sounds strange to me. The opposite should be the intention of this release, that the Designer and Engine classpath is much more streamlined. As they both rely on the same OSGi classloading behaviour. While the older versions had a completely different classloading stack. Can you share a simple demo that shows that you can access a class in the Designer, but no on the engine?

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

My problem is the next one, I can find some libraries like the commons-io-2.5.jar inside the Axon.ivy Libraries like you can see in the provided screenshot:

alt text

If you look at the Engine documentation of 7.0.8: http://developer.axonivy.com/doc/7.0.latest/readme-engine

The commons-io-2.5.jar is not present in any plugins.

If you look at the Engine documentation of 7.0.8: http://developer.axonivy.com/doc/6.0.latest/readme-engine

You can find the jar commons-io-2.4.jar

I hope it helps :)

(23.10 at 03:01) AxonIvyDevel... AxonIvyDeveloper's gravatar image

I don't see the problem. It is in the engine ... so any ivy project running on the engine should be able to access it.

(23.10 at 04:35) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

ok I don't know where I get confused then... Sorry. I really searched like 2-3 weeks ago and didn't find it, but maybe I did a type error or something went wrong.

But maybe you can help me to understand two more thing:

  1. Is it possible to add those "plugins" on the classpath of a normal java program?

And for the maven dependency in our PMV like processing image library, we don't have to change anything for the OSGI mode?

Thanks a lot by the way!

(23.10 at 05:05) AxonIvyDevel... AxonIvyDeveloper's gravatar image

We rely on a proper OSGi classpath. So we can avoid ClassLoading problems and dependency resolution conflicts (aka JAR-Hell). Trying to run normal Java-Code with our OSGi bundle JARs is not recommended or supported. So you should not use your own Main class or similar. But you can run any java code safely within our IvyProject environment.

If you face classloading issues in build process with maven you could share a flat classpath of the engine to provide build dependencies. But not to run an Java process on it. See https://axonivy.github.io/project-build-plugin/release/7.0/share-engine-core-classpath-mojo.html

link

answered 23.10 at 06:14

Reguel%20Wermelinger's gravatar image

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

edited 23.10 at 06:18

Actually I found a new one, before the documentation or anything is updated I want to report again that some library are not in both available:

This time I found that javax.inject-1.jar is present in the Designer Axon.Ivy base libaries but not in the Engine!

I searched in the documentation and I cannot find any entries in the https://developer.axonivy.com/doc/7.0.latest/readme-engine for the text inject!

Last time sadly I saw the problem and needed to wait 3 weeks before that someone answered, so a lot of thing can change in 3 weeks but today the 25.10.2018 I really didn't found anything about the javax.inject library in the engine readme, but this is present in the designer.

alt text

Thanks for the help and cheers, Axon Ivy developer

link

answered 25.10 at 05:18

AxonIvyDeveloper's gravatar image

AxonIvyDevel...
145
accept rate: 0%

edited 25.10 at 05:25

This jar is available in the plugin: ch.ivyteam.util

This was the same for the common-io jar before. They are present but not documented actually, therefore I though they were missing in the engine.

But I still wondering why is the plugin documentation not documenting all available jar but only a subset. Is it because we should not use them at all? or is it because it was forgotten?

(25.10 at 06:29) AxonIvyDevel... AxonIvyDeveloper's gravatar image

It is a big bad smell if anyone needs the path to our internal JARs. We share a limited subset of popular libraries on the classpath so that it can be used within ivyProjects. But there is absolutely no guarantee that we will keep the way how we ship these JARs or which classloading mechanism is in charge under the hood.

(29.10 at 10:12) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

Ok then can you explain to me how I can add to my PMV a Jars from those plugins who would for example be removed? Let take this avax.inject-1.jar and lets supposed my IVY Projet is using it and you remove it from the engine. How do we proceed? Should we adapt our Maven pom file? or add it manually to a bundle project?

(29.10 at 10:44) AxonIvyDevel... AxonIvyDeveloper's gravatar image

And what about old PMV developed with Axon Ivy 5.X for example, if you remove a jar from engine that we are using in an old PMV do we have to adapt anything?

(29.10 at 10:45) AxonIvyDevel... AxonIvyDeveloper's gravatar image

we would never remove a JAR from an already released version. changing the classloading mechanism in general is always a heavy migration that comes first in major leading edge releases and later in an official long term supported release

(05.11 at 05:17) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

Ok I found already a part of the answer:

If provided jar is removed from the osgi environnent we can add it to the ear and to the ear classpath. I still dont know If old pmv dependencies are still going to work.

Do somebody know anything related to old pmv migration? Are the dependencies also persisted?

I believe that the dependencies of each ears are persisted with the PMV version in the Axon temp folder. So that when we migrate to a new Axon Ivy Version we don't have to provide 2 or 3 different versions of Hibernate, or JSF or some random lib that were removed.

link

answered 05.11 at 03:01

AxonIvyDeveloper's gravatar image

AxonIvyDevel...
145
accept rate: 0%

We do not work with any EAR mechanism... so it seems like your still following an unsupported way to use the engine. If you want to run advanced java code, that relies on restricted internals, within our OSGi environment you will need to design your JAR/Project as plugin/bundle project. You can develop such a project easily within the Designer. See https://developer.axonivy.com/doc/dev/DesignerGuideHtml/ivy.concepts.html#ivy-extension-eclipse Then you can add internal deps of Eclipse itself or Ivy to your project without hacking the classpath by yourself. See MANIFEST.MF > Dependencies

(05.11 at 05:23) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

Ok it's weird I get this response from one of your colleague about how to add jars who are not provided by Engine (for example maven lib) and he told me to follow this: https://answers.axonivy.com/questions/2089/add-library-with-pom-xml

Because bevore we added those jar in a shared folder who was setted on the engine classpath.

And now we add them into ear lib directory and on the classpath according to this link.

But for my old PMV where the Jars were added into a shared folder I don't know if I have to edit them and redeploy them with the jars now in the classpath instead.

(05.11 at 05:33) AxonIvyDevel... AxonIvyDeveloper'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

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:

×68
×29
×5

Asked: 17.10 at 03:05

Seen: 134 times

Last updated: 05.11 at 06:35