Products | Versions |
---|---|
TIBCO Runtime Agent (TRA) | 5.12.1, 5.12.2 |
The static logger binder is getting referenced from the multiple available Slf4J and log4j jars causing issue with Class loading during startup of many TRA 5.12.x Applications.
Facing the below errors while opening or running the Domainutility/AppManage/BWEngine/tibcoadmin_<Domain_Name>/hawkagent_<Domain_Name> services
Domain Utility Logs:
2023 May 19 13:49:23:844 GMT +0000 DU Error [DomainUtility] AESDKJ-0000 java.lang.NoClassDefFoundError: org/apache/log4j/Level
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at com.tibco.security.TIBCOSecurity.<clinit>(TIBCOSecurity.java:45)
at com.tibco.administrator.du.task.createdomain.SSLParamsForEMSScreen.getVendor(Unknown Source)
at com.tibco.administrator.du.task.createdomain.CreateDomainTask.setupInputParameters(Unknown Source)
at com.tibco.administrator.du.cmdline.CmdLineHandler.execute(Unknown Source)
at com.tibco.administrator.du.DomainUtility.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 10 more
Administrator Tomcat Logs:
ERROR main org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/administrator] - Servlet.init() for servlet [tibco_administrator] threw exception java.lang.NoClassDefFoundError: Could not initialize class net.sf.ehcache.config.ConfigurationFactory at com.tibco.pof.entitystore.CacheManagerProvider.create(Unknown Source) ~[TIBCOrt.jar:?] at com.tibco.pof.entitystore.CacheManagerProvider.getInstance(Unknown Source) ~[TIBCOrt.jar:?] at com.tibco.pof.entitystore.AbstractEntityStore.destroy(Unknown Source) ~[TIBCOrt.jar:?] at com.tibco.pof.entitystore.db.DBEntityStore.destroy(Unknown Source) ~[TIBCOrt.jar:?] at com.tibco.pof.entitystore.EntityStoreManager.getEntityStore2(Unknown Source) ~[TIBCOrt.jar:?] at com.tibco.pof.entitystore.EntityStoreManager.getEntityStore(Unknown Source) ~[TIBCOrt.jar:?] at com.tibco.pof.entitystore.EntityStoreManager.getReadOnlyEntityDomain(Unknown Source) ~[TIBCOrt.jar:?]
ERROR main org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/com.tibco.atlas.administrator.auth.provider] - Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
java.lang.NoClassDefFoundError: org/apache/log4j/Level
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150) ~[slf4j-api-1.7.31.jar:1.7.31]
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) ~[slf4j-api-1.7.31.jar:1.7.31]
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417) ~[slf4j-api-1.7.31.jar:1.7.31]
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362) ~[slf4j-api-1.7.31.jar:1.7.31]
Prepend "%TPCL_HOME%/lib/slf4j-simple-1.7.31.jar" beginning of tibco.class.path.extended in the respective TRA file of the application.
E.g. User can modify "tibco.class.path.extended" in file domainutilitycmd.tra as below:
tibco.class.path.extended %TPCL_HOME%/lib/slf4j-simple-1.7.31.jar:%TRA_HOME%/hotfix/lib:%TRA_HOME%/lib:%TPCL_HOME%/tomcat/9/lib:%TPCL_HOME%/tomcat/9/bin:%TPCL_HOME%/tomcat/common/lib/:%TPCL_HOME%/tomcat/server/lib/:%TPCL_HOME%/lib:%RV_HOME%/lib/tibrvj.jar:%RV_HOME%/bin:%HAWK_HOME%/bin:%HAWK_HOME%/lib:%TPCL_HOME%/jdbc:%TPCL_HOME%/ant/1.10/lib:%TPCL_HOME%/lib/entrust:%TRA_HOME%/lib/install:%EMS_HOME%/lib/64:%EMS_HOME%/lib
In case it is needed, users may use the sample script to update all .tra files. For example, the below script will look for all .tra files under the current folder and prepend
"%TPCL_HOME%/lib/slf4j-simple-1.7.31.jar" to the classpath.
=========================================
#!/bin/bash
find . -type f -name "*.tra" -exec sed -i 's/tibco.class.path.extended=/tibco.class.path.extended /g' {} \;
find . -type f -name "*.tra" -exec sed -i 's/tibco.class.path.extended\s\{1,\}/tibco.class.path.extended %TPCL_HOME%\/lib\/slf4j-simple-1.7.31.jar:/g' {} \;
=========================================
Please contact TIBCO support if further assistance is needed.