java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder

java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder

book

Article ID: KB0086455

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:
When trying to start an application, the following error is thrown: 

org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder

Error trace:

./LogService-2-LogService.sh
Using property file /tibco/ste/etc/bw/ccdcsh1_csh_ap_dom/3.3/tra/domain/ccdcsh1_csh_ap_dom/application/LogService-2/LogService-2-LogService.tra
Using work space directory /tibco/ste/etc/bw/ccdcsh1_csh_ap_dom/3.3/tra/domain/ccdcsh1_csh_ap_dom/application/LogService-2/working/LogService-2-LogService
Creating trace file /tibco/ste/etc/bw/ccdcsh1_csh_ap_dom/3.3/tra/domain/ccdcsh1_csh_ap_dom/application/logs/LogService-2-LogService.log
Using XMLReader org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
2013 Jul 02 17:24:10:456 GMT +8 BW.LogService-2-LogService Info [BW-Core] BWENGINE-300001 Process Engine version 5.10.0, build V48, 2012-6-3
2013 Jul 02 17:24:10:462 GMT +8 BW.LogService-2-LogService Info [BW-Core] BWENGINE-300009 BW Plugins: version 5.10.0, build V48, 2012-6-3
2013 Jul 02 17:24:10:470 GMT +8 BW.LogService-2-LogService Info [BW-Core] BWENGINE-300010 XML Support: TIBCOXML Version 5.51.500.003
2013 Jul 02 17:24:10:470 GMT +8 BW.LogService-2-LogService Info [BW-Core] BWENGINE-300011 Java version: Java HotSpot(TM) Server VM 20.5-b03
2013 Jul 02 17:24:10:470 GMT +8 BW.LogService-2-LogService Info [BW-Core] BWENGINE-300012 OS version: i386 Linux 2.6.18-238.45.1.el5
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/rccdreg4/shared/jars/slf4j-simple-1.4.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/tibco/ste/3.3/tpcl/5.7/lib/slf4j-log4j12-1.5.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/tibco/ste/3.3/tpcl/5.7/lib/slf4j-simple-1.5.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/tibco/ste/3.3/hawk/4.9/lib/slf4j-log4j12-1.5.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/tibco/ste/3.3/hawk/4.9/lib/commonlogging-slf4jadapter.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/tibco/ste/3.3/hawk/4.9/lib/slf4j-simple-1.5.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.
SLF4J: Your binding is version 1.5.5 or earlier.
SLF4J: Upgrade your binding to version 1.6.x.
2013 Jul 02 17:24:10:661 GMT +8 BW.LogService-2-LogService Error [BW-Core] BWENGINE-100001 org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
        at com.tibco.security.impl.new.OOoO.<clinit>(CryptoVendor.java:32)
        at com.tibco.security.Crypto.undo(Crypto.java:73)
        at com.tibco.security.ObfuscationEngine.decrypt(ObfuscationEngine.java:319)
        at com.tibco.objectrepo.mapper.GSVMapper.prepareAssocFromXML(GSVMapper.java:171)
        at com.tibco.objectrepo.mapper.NodesMapper.callPrepareAssocFromXML(NodesMapper.java:729)
        at com.tibco.objectrepo.mapper.GSVMapper.map(GSVMapper.java:127)
        at com.tibco.objectrepo.object.ObjectProvider.readDefaultVars(ObjectProvider.java:3476)
        at com.tibco.objectrepo.object.ObjectProvider.loadDefaultVars(ObjectProvider.java:3417)
        at com.tibco.objectrepo.object.ObjectProvider.loadDefaultVars(ObjectProvider.java:3412)
        at com.tibco.objectrepo.object.ObjectProvider.loadDefaultVars(ObjectProvider.java:3412)
        at com.tibco.objectrepo.object.ObjectProvider.loadDefaultVars(ObjectProvider.java:3412)
        at com.tibco.objectrepo.object.ObjectProvider.<init>(ObjectProvider.java:142)
        at com.tibco.pe.core.RepoLoader.<init>(Unknown Source)
        at com.tibco.pe.PEMain.a(Unknown Source)
        at com.tibco.pe.PEMain.do(Unknown Source)
        at com.tibco.pe.PEMain.a(Unknown Source)
        at com.tibco.pe.PEMain.<init>(Unknown Source)
        at com.tibco.pe.PEMain.main(Unknown Source)

Symptoms:
Unable to start application. It fails with the previously mentioned errors.

Cause:
Possible Cause 1:

Above the error the stack trace can be seen :

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/rccdreg4/shared/jars/slf4j-simple-1.4.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/tibco/ste/3.3/tpcl/5.7/lib/slf4j-log4j12-1.5.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/tibco/ste/3.3/tpcl/5.7/lib/slf4j-simple-1.5.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]


This appears  to be due to a class conflict.


jar at "/rccdreg4/shared/jars/" -> slf4j-simple-1.4.2.jar
jar at /tibco/ste/3.3/tpcl/5.7/lib/" -> slf4j-simple-1.5.2.jar.
slf4j-simple-1.4.2.jar and slf4j-simple-1.5.2.jar both are present here.

Reference from the error stack:

SLF4J: Found binding in [jar:file:/rccdreg4/shared/jars/slf4j-simple-1.4.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
and
SLF4J: Found binding in [jar:file:/tibco/ste/3.3/tpcl/5.7/lib/slf4j-simple-1.5.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]

Possible Cause 2:

Due to an API dependency including the dependency for the sflj's API but not the dependency for the implementation of the API. For example, to log through Log4J, add the following dependency:

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.5.2</version>
    </dependency>

Issue/Introduction

java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder

Resolution

Need to remove the jar -> slf4j-simple-1.4.2.jar as the other one seems to be shipped with the TIBCO Stack. Start the services after removing the refrence to slf4j-simple-1.4.2.jar  or add the dependency. For example, to log through Log4J, add the following dependency:

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.5.2</version>
    </dependency>