Hi, just an idea: slf4j-log4j12-1.7.7.jar sounds like a binding for log4j 1.2 not for log4j 2.0. So I would guess it's a wrong binding. No idea if there exists a 2.0 Binding. See http://logging.apache.org/log4j/2.x/log4j-slf4j-impl/
Regards Niels 2014-07-28 20:53 GMT+02:00 Mike Wertheim <mi...@hyperreal.org>: > Hi, > > I am trying to migrate my app from log4j 1.2 to log4j 2.0. My app uses > log4j directly, and it also uses a third party library that uses slf4j. > > I put following jar files in my Classpath: > log4j-api-2.0.jar, log4j-core-2.0.jar > slf4j-api-1.7.7.jar, slf4j-log4j12-1.7.7.jar > > When I try to start my app, the third party library's use of slf4j causes > this exception to be thrown: > > java.lang.NoClassDefFoundError: org/apache/log4j/Level > at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129) > at > org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108) > at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302) > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276) > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288) > > This is not surprising, since the log4j 2.0 migration page ( > http://logging.apache.org/log4j/2.x/manual/migration.html) says: "The > main package in version 1 is org.apache.log4j, in version 2.0 it is > org.apache.logging.log4j" > > Am I correct that the slf4j developers will need to make some > modifications to slf4j to enable compatibility with log4j 2.0 > (specifically, changing slf4j to look for the log4j classes in > org.apache.logging.log4j rather than org.apache.log4j)? > > Or is there some workaround to this issue that I can do now? > > > Thanks, > Mike > > _______________________________________________ > slf4j-user mailing list > slf4j-user@qos.ch > http://mailman.qos.ch/mailman/listinfo/slf4j-user >
_______________________________________________ slf4j-user mailing list slf4j-user@qos.ch http://mailman.qos.ch/mailman/listinfo/slf4j-user