Hi,
I have a jar file (say JAR1) placed in /code/jars folder. This jar file has dependency with other jars as mentioned in the class-path attribute below (The extract below is from the MANIFEST.MF of the JAR1).
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: author.name
Class-Path: libs/jar-test-1.1-SNAPSHOT.jar libs/commons-lang3-3.1.jar
Created-By: Apache Maven 3.2.5
Build-Jdk: 1.8.0_77
Main-Class: com.prac.test.ImportTest
I have placed the libs folder in /code/jars but whenever JAR1 tries to use classes from the jars under libs/, it throws NoClassDefFoundError. I placed the libs folder in /lib but no luck.
Can you please advise where to place the libs jar files so that JAR1 can recognise libs/
Kind regards,
Raj
Place the jars inside the package to access it at the package level, if you want the IS to access you can place IS jar lib folder.
For the java service to compile place the jar in the designer workspace.
Hi M@he$h,
I need package level class loader to load these JARs. As highlighted above, I have placed the jars inside the package at the mentioned paths but no luck.
Also, the question here is about placing the jar’s dependent jars. Do you have any inputs?
Kind regards,
Raj
Hi,
Have you reloaded the package after placing the files there?
If that didn’t work, have you tried restarting the IS so it will search for the jar files?
If you are using a pre-9.x version, you may have to fully stop the service and start it again so the wrapper script captures the jar files.
Best regards
Hi Gerardo,
We are on 9.x version. I have done package reload, restart of IS but no luck
Hi Raja,
which class exactly can not be found?
It might be that there are different versions of jar in the classpath, one containing the class and one does not.
When the version without the class is loaded before the other one the class is unavailable.
Regards,
Holger