Description:
Tss-agent throws error during startup after upgrading TEA or TEA-SDK from version 2.1 to 2.2.
Symptoms:
1). Install TEA/TEA-SDK 2.1.0 under a new tibco-home.
2). Start the tea server from the <tibco-home>/tea/2.1/bin directory.
3). Start the tss-agent from the <tibco-home>\tea\agents\tss\1.0\bin directory. Everything should work as expected, the tss-agent gets auto-registered.
4). Stop the tea server and tss-agent and install TEA/TEA-SDK 2.2.0 in the same <tibco-home> directory.
5). Start the new TEA server from the <tibco-home>/tea/2.2/bin directory.
6). Start the tss-agent from the <tibco-home>\tea\agents\tss\1.0\bin directory.
You will notice the following error.
****************************************************************************
java.lang.ClassCastException: org.slf4j.impl.CommonLoggingLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext
at com.tibco.trinityserver.core.TrinityServer.initLogback(TrinityServer.java:191)
at com.tibco.trinityserver.core.TrinityServer.<init>(TrinityServer.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at com.tibco.trinityserver.startup.Main.main(Main.java:27)
****************************************************************************
Cause: This is happening because TSS kept using the same version number (i.e 1.0) in the TEA 2.1 and TEA 2.2 releases. When TEA gets upgraded from version 2.1 to 2.2, TEA gets installed in a separate folder but TSS gets installed in the same folder over the top of the previous version. This is a problem because in TSS we started using logback as the logging binding for slf4j, replacing log4j used in earlier releases. Because the TSS version number has not changed, everything gets installed into the same 1.0 folder and the TSS lib now has JAR files for both log4j and logback which causes the exception.