[slf4j-user] Spring -> SLF4J -> Logback

Maarten Bosteels mbosteels.dns at gmail.com
Tue Mar 22 10:10:09 CET 2011


You still need apache commons-logging as dependency.

Maarten

On Tue, Mar 22, 2011 at 5:42 AM, Luciano Santos
<greiner.luciano at gmail.com> wrote:
> Hello.
>
>  I am trying to integrate Logback for the first time in a project of
> mine, and i'm having such a hard time trying to use it along with
> Spring 3.0.5.
> I declared jcl-over-slf4j dependency so it replaces commons-logging
> used by spring-core, but it seems like something is missing or wrong:
>
> java.lang.NoSuchMethodError:
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
>       at org.apache.commons.logging.impl.SLF4JLocationAwareLog.info(SLF4JLocationAwareLog.java:159)
>       at org.springframework.jca.context.SpringContextResourceAdapter.start(SpringContextResourceAdapter.java:151)
> ...
>
> Here're my logging dependencies (No commons-logging or log4j are being used):
>               <dependency>
>                       <groupId>ch.qos.logback</groupId>
>                       <artifactId>logback-core</artifactId>
>                       <version>0.9.28</version>
>                       <type>jar</type>
>                       <scope>runtime</scope>
>               </dependency>
>               <dependency>
>                       <groupId>ch.qos.logback</groupId>
>                       <artifactId>logback-classic</artifactId>
>                       <version>0.9.28</version>
>                       <type>jar</type>
>                       <scope>runtime</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.slf4j</groupId>
>                       <artifactId>slf4j-api</artifactId>
>                       <version>1.6.1</version>
>                       <type>jar</type>
>                       <scope>runtime</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.slf4j</groupId>
>                       <artifactId>jcl-over-slf4j</artifactId>
>                       <version>1.6.1</version>
>                       <type>jar</type>
>                       <scope>runtime</scope>
>               </dependency>
>
> Any thoughts about what may be wrong?
>
> Thank you
>
> Luciano
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://qos.ch/mailman/listinfo/slf4j-user
>


More information about the slf4j-user mailing list