IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Jar and it's dependant jars

    Posted Thu July 06, 2017 04:53 AM

    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


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Jar and it's dependant jars

    Posted Thu July 06, 2017 11:09 AM

    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.


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Jar and it's dependant jars

    Posted Thu July 06, 2017 10:05 PM

    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


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Jar and it's dependant jars

    Posted Fri July 07, 2017 04:47 AM

    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


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Jar and it's dependant jars

    Posted Tue July 11, 2017 01:57 AM

    Hi Gerardo,

    We are on 9.x version. I have done package reload, restart of IS but no luck :frowning:


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: Jar and it's dependant jars

    Posted Tue July 11, 2017 12:54 PM

    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


    #webMethods
    #Integration-Server-and-ESB