App Connect

App Connect

Join this online user 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.  External Jar showing NoClassDefFound Error in Java Compute Node

    Posted Tue September 07, 2021 09:19 AM
    Hi Team,

    In my integration flow, Java compute node I am doing base64 encoding. To do that I am using
    commons-codec jar. I have downloaded the jar and adding in build path of the project.

    Its not showing any compilation error.But run time I am getting
    NoClassDefFoundError

    Code:
    import org.apache.commons.codec.binary.Base64;

    Base64.encodeBase64String(cipherText).replace("\r", "").replace("\n", "");

    Why I am getting this error ven adding the library in build path.

    Any help will be really appreciated!!!




    ------------------------------
    SELVAKUMAR ANANTHARAJ
    ------------------------------


  • 2.  RE: External Jar showing NoClassDefFound Error in Java Compute Node

    Posted Tue September 07, 2021 10:10 AM
    Hi SELVAKUMAR,

    I think, you need to keep the jar in the shared-classes folder so that broker/integration node can refer it in run time.

    Below are the path where the jars can be placed.

    For Windows: C:\ProgramData\IBM\MQSI\shared-classes

    For Linux: /var/mqsi/shared-classes

    Regards,
    Saha

    ------------------------------
    Prosanta Saha
    ------------------------------



  • 3.  RE: External Jar showing NoClassDefFound Error in Java Compute Node

    Posted Tue September 07, 2021 10:22 AM
    Edited by SELVAKUMAR ANANTHARAJ Tue September 07, 2021 10:22 AM
    Thanks Prosanta Saha!!!. After copying the jar files to shared-classes Its working fine.

    ------------------------------
    SELVAKUMAR ANANTHARAJ
    ------------------------------



  • 4.  RE: External Jar showing NoClassDefFound Error in Java Compute Node

    Posted Mon June 10, 2024 09:36 AM

    Hi Prosanta, 

    Do you know how to do it on CP4I



    ------------------------------
    hassan sheta
    ------------------------------



  • 5.  RE: External Jar showing NoClassDefFound Error in Java Compute Node

    Posted Mon June 10, 2024 09:42 AM

    Hello Hassan Sheta,

    You may create a java project, place the .jar file inside the java projects folder and reference the java project from your library. Thanks!

    Regards,

    Arun



    ------------------------------
    Arun
    ------------------------------