Hi, You have two SLF4J bindings in your classpath: slf4j-nop-1.7.2 and slf4j-jdk14-1.7.1 Try removing one of them and see if it helps.
Also have a look at http://www.slf4j.org/manual.html regards Maarten On Fri, Feb 1, 2013 at 12:50 AM, jimweaver <[email protected]> wrote: > Hi, > > I have added a third party tool (yammer's Metrics) which uses slf4j to my > java web application. At points where the Metrics classes attempt to log, > I > am getting a NoClassDefFound on org.slf4j.LoggerFactory: > > Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory > at com.yammer.metrics.reporting.JmxReporter.(JmxReporter.java:19) > at com.yammer.metrics.Metrics.(Metrics.java:20) > > In this case I am running my application from Jetty, and the jetty launch > class path includes the following slf jars (forgive long paths, pasting > this > snippet directly from classpath echoed out on console): > > > ....metrics-core-2.2.0.jar:/Users/jimweaver/.m2/repository/org/slf4j/slf4j-api/1.7.2/*slf4j-api-1.7.2.jar*:/Users/jimweaver/.m2/repository/org/slf4j/slf4j-jdk14/1.7.1/*slf4j-jdk14-1.7.1.jar*:/Users/jimweaver/.m2/repository/org/slf4j/slf4j-nop/1.7.2/*slf4j-nop-1.7.2.jar*:/Users/jimweaver/.m2/repository/org/apache/lucene/lucene-core/2.9.1/lucene-core-2.9.1.jar:/Users/jimweaver/.m2/repos...... > > These are the only occurrences of slf4j jars on the classpath - there are > no > other conflicting older versions present. The LoggerFactory class is > pretty > clearly inside the slf4j-api-1.7.2.jar file, and it does not appear to have > any static block code in that class that might fail and erroneously report > it as a class not found exception. So, I am a bit stumped. Class is > present on the web application's classpath, but being reported as not > found. > The path is being generated by my jetty launcher, and classes in jars > following the slf4j jars are being found, so there aren't any funky typos > in > the path that would cause the inclusion of jars in the path sting to be > short-circuited. > > Anyone have any ideas? > > > > -- > View this message in context: > http://slf4j.42922.n3.nabble.com/NoClassDef-on-LoggerFactory-tp4025414.html > Sent from the slf4j - user mailing list archive at Nabble.com. > _______________________________________________ > slf4j-user mailing list > [email protected] > http://mailman.qos.ch/mailman/listinfo/slf4j-user >
_______________________________________________ slf4j-user mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/slf4j-user
