[slf4j-user] blog entry on JCL

Matt Raible mraible at gmail.com
Mon Feb 5 20:12:10 CET 2007


AFAIK, that should all be handled by Maven's transitive dependencies.
jcl-over-slf4j depends on slf4j-simple, which depends on slf4j-api.

http://mvnrepository.com/artifact/org.slf4j/jcl104-over-slf4j/1.2

It's probably an issue with the dependencies I need to configure for
the Maven plugin.

I tried adding slf4j-log4j13 to my pom.xml and now I get:

[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.apache.log4j.Logger.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoSuchMethodError:
org.apache.log4j.Logger.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
        at org.slf4j.impl.Log4jLoggerAdapter.info(Log4jLoggerAdapter.java:166)
        at org.apache.commons.logging.impl.SLF4JLog.info(SLF4JLog.java:118)
        at org.hibernate.cfg.annotations.Version.<clinit>(Version.java:15)
        at org.hibernate.cfg.AnnotationConfiguration.<clinit>(AnnotationConfiguration.java:59)

Matt


On 2/5/07, Ceki Gülcü <listid at qos.ch> wrote:
> Matt,
>
> The NoClassDefFoundError on "org/slf4j/LoggerFactory" indicates that you
> are missing an SLF4J binding. Do you have an SLF4J binding? On top of
> slf4j-api.jar, jcl-over-slf4j.jar, you also need any one of
> slf4j-nop.jar/slf4j-simple.jar/slf4j-log4j12.jar files.
>
> HTH.
>
>
>
> At 07:46 PM 2/5/2007, you wrote:
> >Here's the error I get from the Hibernate 3 Plugin: [INFO]
> >------------------------------------------------------------------------
> >[ERROR] FATAL ERROR [INFO]
> >------------------------------------------------------------------------
> >[INFO] org/slf4j/LoggerFactory [INFO]
> >------------------------------------------------------------------------
> >[INFO] Trace java.lang.NoClassDefFoundError:
> >org/slf4j/LoggerFactory         at
> >org.apache.commons.logging.impl.SLF4FLogFactory.getInstance(SLF4FLogFactory.java:154)
> >at
> >org.apache.commons.logging.impl.SLF4FLogFactory.getInstance(SLF4FLogFactory.java:130)
> >at
> >org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
> >at
> >org.hibernate.cfg.Configuration.<clinit>(Configuration.java:120)
> >at
> >org.codehaus.mojo.hibernate3.configuration.AnnotationComponentConfiguration.createConfiguration(AnnotationComponentConfiguration.java:41)
> >at
> >org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.getConfiguration(AbstractComponentConfiguration.java:32)
> >at
> >org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLExporterMojo.java:87)
> >at
> >org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:139)
> >I'll post a message to the mojo user list and see if they have a solution.
> >Matt On 2/5/07, Ceki Gülcü <listid at qos.ch> wrote: > > Matt, > > Welcome
> >to the slf4j user list.  I just came across your blog entry on > commons
> >logging [1]. > You write that <quote>I tried changing to
> ><http://www.slf4j.org/>SLF4J, but > that causes some Maven plugins to
> >fail. </quote> > > Could you briefly mention how SLF4J fails for maven
> >plugins? Even the > shortest description might help. > > Many thanks in
> >advance, > > [1]
> >http://raibledesigns.com/page/rd?entry=maven_2_hates_commons_logging > > >
> > > -- > Ceki Gülcü > Logback: The reliable, generic, fast and flexible
> >logging framework for Java. > http://logback.qos.ch > >
> >_______________________________________________ > user mailing list >
> >user at slf4j.org > http://www.slf4j.org/mailman/listinfo/user > --
> >http://raibledesigns.com _______________________________________________
> >user mailing list user at slf4j.org http://www.slf4j.org/mailman/listinfo/user
>
> --
> Ceki Gülcü
> Logback: The reliable, generic, fast and flexible logging framework for Java.
> http://logback.qos.ch
>
> _______________________________________________
> user mailing list
> user at slf4j.org
> http://www.slf4j.org/mailman/listinfo/user
>


-- 
http://raibledesigns.com


More information about the slf4j-user mailing list