cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <>
Subject Re: C2.2 - Mixing SLF4J with Cocoon
Date Thu, 17 Jul 2008 07:51:23 GMT
Cocoon does not directly use Log4j. It uses an abstraction layer that 
defaults to log4j. slf4j is also an abstraction layer. In the stack 
trace you have shown below it is using its SimpleLogger implementation. 
This can be replaced with Logback, Log4j or java.util.logging. You might 
simply try replacing slf4j-simple.jar with slf4j-log4j12.jar.

Another alternative is that Spring actually wants to use 
commons-logging. Somehow that has been replaced with SLF4J's 
comons-logging compatible implementation. If you just remove 
jcl-over-slf4j.jar and replace it with commons-logging.jar this should 
also remove slf4j.


David Legg wrote:
> I'm trying to add a new block to a Cocoon web app and every time I try 
> to do a 'mvn jetty:run' command I get a 
> 'java.lang.AbstractMethodError' and the web app just seems to stop 
> serving web pages (error list shown at end of this message).
> The block in question makes calls to the Sesame [1] RDF triplestore.  
> The important thing is that, like a lot of modern Java apps, Sesame 
> makes use of SLF4J [2] to do its logging.  I'm not familiar with the 
> various logging frameworks but I think I've accidently walked into a 
> minefield here!  Cocoon seems to use Log4j, Jetty might be using 
> something else and my block might need slf4j.  Add to this that I've 
> seen a report about slf4j not playing well with the Reloading Class 
> Loader (RCL) and I think I'm well and truly stuffed!
> Please, if anyone knows how to get a library that uses slf4j to play 
> nicely in a Cocoon environment I'd be very grateful ;-)
> Regards,
> David Legg
> Errors...
>  ...
>  [INFO] [jetty:run]
>  [INFO] Configuring Jetty for project: meerkat-browser
>  ...
>  2008-07-15 16:57:35.032::INFO:  Logging to STDERR via 
> org.mortbay.log.StdErrLog
>  [INFO] Starting jetty 6.1.7 ...
>  2008-07-15 16:57:35.112::INFO:  jetty-6.1.7
>  ...
>  2008-07-15 16:57:36.964::WARN:  failed 
> org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@7db754{/,D:\projects\meerkat\meerkat-browser\target\rcl\webapp}

>  java.lang.AbstractMethodError: 
> org.slf4j.impl.SimpleLogger.trace(Ljava/lang/String;)V
>          at 
> org.apache.commons.logging.impl.SLF4JLog.trace(
>          at 
> org.springframework.core.CollectionFactory.createConcurrentMapIfPossible(

>  ...
> [1]
> [2]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message