Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder maven

Ads

 
 

Share on Google+Share on Google+

Java Coder
java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder maven
2 Answer(s)      3 years and a month ago
Posted in : Java Beginners

Hi,

I have a maven web application and I am trying to run it but its giving following error:

java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

How to resolve the error?

Thanks

Ads
View Answers

May 31, 2014 at 10:27 AM


Hi,

You should add the following code into pom.xml file:

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

This will solve the problem.

Usually following error comes if the dependency is not satisfied:

Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
        at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:189)
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:112)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:105)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:235)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208)
        at org.hibernate.validator.util.LoggerFactory.make(LoggerFactory.java:29)
        at org.hibernate.validator.util.Version.<clinit>(Version.java:30)
        at org.hibernate.validator.engine.ConfigurationImpl.<clinit>(ConfigurationImpl.java:52)
        at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:43)
        at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:269)
        at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:223)
        at org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean.afterPropertiesSet(OptionalValidatorFactoryBean.java:40)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
        ... 60 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
        ... 74 more
[WARNING] failed dispatcher

Thanks



May 31, 2014 at 10:27 AM


The above answer is really helpful in solving the error:

java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

Thanks


Ads









Related Tutorials/Questions & Answers:
Maven - Maven
Maven  I am new to maven tool.i don't know anything abt that? plesae explain me about maven   Hi mamatha, Maven is a high-level... software foundation group. Maven deals with application development lifecycle
Artifacts of maven
List of Artifacts of maven maven depenency
Advertisements
Version of maven>maven dependency
List of Version of maven>maven dependency
Maven Dependency maven >> 1.0
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0 in your project
Maven Dependency maven >> 1.0.1
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0.1 in your project
Maven Dependency maven >> 1.0.2
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0.2 in your project
Maven Dependency maven >> 1.0-beta-10
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-beta-10 in your project
Maven Dependency maven >> 1.0-beta-5
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-beta-5 in your project
Maven Dependency maven >> 1.0-beta-6
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-beta-6 in your project
Maven Dependency maven >> 1.0-beta-7
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-beta-7 in your project
Maven Dependency maven >> 1.0-beta-8
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-beta-8 in your project
Maven Dependency maven >> 1.0-beta-8.20021007.010812
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-beta-8.20021007.010812 in your project
Maven Dependency maven >> 1.0-beta-8.20030202.153444
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-beta-8.20030202.153444 in your project
Maven Dependency maven >> 1.0-beta-8.20030202.153715
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-beta-8.20030202.153715 in your project
Maven Dependency maven >> 1.0-beta-8.20030202.153859
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-beta-8.20030202.153859 in your project
Maven Dependency maven >> 1.0-rc1
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-rc1 in your project
Maven Dependency maven >> 1.0-rc2
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-rc2 in your project
Maven Dependency maven >> 1.0-rc3
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-rc3 in your project
Maven Dependency maven >> 1.0-rc4
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.0-rc4 in your project
Maven Dependency maven >> 1.1
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.1 in your project
Maven Dependency maven >> 1.1-beta-1
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.1-beta-1 in your project
Maven Dependency maven >> 1.1-beta-2
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.1-beta-2 in your project
Maven Dependency maven >> 1.1-beta-3
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.1-beta-3 in your project
Maven Dependency maven >> 1.1-RC1
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version1.1-RC1 in your project
Maven Dependency maven >> 20030211.132709
You should include the dependency code given in this page to add Maven Dependency of maven >> maven version20030211.132709 in your project
Maven Jobss Plugin - Maven
Maven Jobss Plugin  How to deploy your application using maven tool.... So, to make the things simple we used jboss-maven-plugin to deploy... org.codehaus.mojo jboss-maven-plugin  Hi, I was working on a project where
Version of maven>maven-component dependency
List of Version of maven>maven-component dependency
Version of maven>maven-it-support dependency
List of Version of maven>maven-it-support dependency
Version of maven>maven-model dependency
List of Version of maven>maven-model dependency
Maven 2 - Maven
Maven 2   Hi, I m new to Maven 2 and in process to implement Maven2. I have browse in the net and got my Maven 2 installed but now I m facing few concerns on creating a small project. Please help me in this regard Thanks
Maven Exclusion - Maven
Maven Exclusion  While doing a project I was encountered a problem... jsf-api-1.2_06.jar jsf-impl-1.2_06.jar Here is the full code of maven-war plugin maven-war-plugin 2.0.2 **/jdbc.properties   Hello,My problem