IBM TechXchange Business Automation DACH User Group

IBM TechXchange Business Automation DACH User Group

Die Business Automation DACH User Group ist eine Plattform für alle Anwender des IBM Business Automation Portfolio

Das Ziel dieser Community ist es:

  • sich in Expertengruppen auszutauschen
  • von gemeinsamen Erfahrungen zu profitieren
  • andere IBM-Anwender und IT-Professionals kennenzulernen
  • wertvolle Netzwerke aufzubauen
  • persönliche Kanäle für exklusive IBM-Insights aufzubauen
  • Impulse aus der Praxis für die Weiterentwicklung des IBM-Portfolios bereitzustellen

#BusinessAutomationWorkflow(BAW)
#OperationalDecisionManager(ODM)
 View Only
Expand all | Collapse all

Content Navigator Plugins (NoClassDefFoundError)

  • 1.  Content Navigator Plugins (NoClassDefFoundError)

    Posted Tue October 18, 2022 08:59 AM
    I have more than one custom plugins in my ICN app and there is a plugin which is dependent on the java class from another common plugin. Kept the ordering of the common plugin at the top thinking the java classes in the common plugins will be loaded and available in the class path so it will be available for other plugins to use them. But getting NoClassDefFoundError while loading the plugin.

    ------------------------------
    Mohan Chandran
    ------------------------------


  • 2.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Thu October 27, 2022 08:27 AM
    Edited by Mark Jordan Thu October 27, 2022 08:27 AM
    Hi Mohan -

    On what build of ICN is this occurring?

    ------------------------------
    Mark Jordan
    ------------------------------



  • 3.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Thu October 27, 2022 12:17 PM
    Message From: Mohan Chandran

    Hi Mark,
    This issue is happening in 3.0.11. Currently, we have plugins that are dependent on 2 external libraries so in on premise environment these 2 libraries are deployed into navigator.war/WEB-INF/lib folder so these libraries are available in class path. 

    We are now trying to move this set up to container but navigator.war is not expanded in EKS Pod, I am trying to find an option to keep these libraries in class path so plugins works fine.

    Does ICN have similar to below 
    https://www.ibm.com/docs/en/filenet-p8-platform/5.5.x?topic=acice-v558-later-adding-libraries-content-platform-engine-classpath-in-container-environment

    Thanks
    Mohan Chandran

    ------------------------------
    Mark Jordan
    ------------------------------



  • 4.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Thu October 27, 2022 01:03 PM
    Hi Mohan,

    ICN doesn't read from the directory mentioned in the documentation but you can follow the documentation and additionally add a new XML file to configDropins/overrides/ with the following content to add extra JAR files to the class path. You'll need to restart ICN pods after making the changes.

    <server>
      <library id="FileNetLib">
        <fileset dir="${server.config.dir}/configDropins/overrides/external-jars" includes="*.jar" scanInterval="5s" />
      </library>
    </server>

    Thanks,
    Andy

    ------------------------------
    ANDY Choi
    ------------------------------



  • 5.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Thu October 27, 2022 02:46 PM
    Thanks Andy. Can you please confirm the file name that I should keep for the XML file.

    ------------------------------
    Mohan Chandran
    ------------------------------



  • 6.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Thu October 27, 2022 03:59 PM
    You can use any name, e.g., library-FileNetLib.xml.

    ------------------------------
    ANDY Choi
    ------------------------------



  • 7.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Thu October 27, 2022 05:08 PM
    Thanks. I will try this and let you know. Also, there are custom properties that are kept in WebSphere profiles/properties directory and these properties are used by custom plugin. Can you please let me know if there is a similar option available in Liberty container.?

    ------------------------------
    Mohan Chandran
    ------------------------------



  • 8.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Thu October 27, 2022 06:58 PM
    That would be a question for the WebSphere team but you might be able to find info you need from WebSphere Liberty documentation.

    ------------------------------
    ANDY Choi
    ------------------------------



  • 9.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Fri October 28, 2022 03:35 PM
    Will I able to use jvm_customize_options in CR Yaml to add the property file location as class path?

    ------------------------------
    Mohan Chandran
    ------------------------------



  • 10.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Mon October 31, 2022 10:41 AM
    jvm_customize_options is used to add additional JVM option. You can try adding a folder to the FileNetLib library if you need to have some properties file in the class path.

    <server>
      <library id="FileNetLib">
        <fileset dir="${server.config.dir}/configDropins/overrides/external-jars" includes="*.jar" scanInterval="5s" />
        <folder dir="<path/to/properties/file>" />
      </library>
    </server>

    ------------------------------
    ANDY Choi
    ------------------------------



  • 11.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Tue November 08, 2022 06:18 PM
    <folder dir="<path/to/properties/file>" />. - can I use the folder location where I have multiple properties file that should be kept in class path ?

    ------------------------------
    Mohan Chandran
    ------------------------------



  • 12.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Tue November 08, 2022 06:39 PM
    Also, I am getting java.lang.ClassNotFoundException while loading plugins which has log4j dependency? log4j is not included in the navigator.war for cloud deployment? 

    Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger

    at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:569)

    at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoader.java:291)

    at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:945)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:890)

    at com.ibm.ws.classloading.internal.AppClassLoader.findOrDelegateLoadClass(AppClassLoader.java:547)

    at com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppClassLoader.java:505)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:873)



    ------------------------------
    Mohan Chandran
    ------------------------------



  • 13.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Wed November 09, 2022 09:50 AM
    You can use <folder> to define a folder to be included in the library classpath for locating resource files.

    ICN doesn't use log4j so you can try including the library in library-FileNetLib.xml but you might want to consider using Log4j 2 that has a fix for Log4Shell.

    ------------------------------
    ANDY Choi
    ------------------------------



  • 14.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Wed November 09, 2022 11:38 AM
    Yes, we do use log4j2. I remember ICN was using log4j2 and log4j12bridge for backward compatibility. right?

    ------------------------------
    Mohan Chandran
    ------------------------------



  • 15.  RE: Content Navigator Plugins (NoClassDefFoundError)

    Posted Fri November 11, 2022 10:19 AM
    Yes, you should be able to confirm by finding log4j JAR files (find /opt/ibm/wlp/usr/servers/defaultServer/workarea -name "log4j*") from the container. If you don't see them, you can try repackaging log4j class files into the plugin JAR file or adding them to library-FileNetLib.xml.

    ------------------------------
    ANDY Choi
    ------------------------------