Tags

These days I was trying to create a Spring MVC jpa application. However when I try to run the application under tomcat 6.0 I got:

java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)

After searching the website, I found the problem is with the version of slf4j-log4j12 jar package.

When I changed from version 1.5.6 to version 1.7.5. i.e. change from

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

To

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

This can be resolved.

Advertisements