[logback-user] Logback 1.3.0/1.4.0 : slf4j-api & StaticLoggerBinder

Raymond Augé raymond.auge at liferay.com
Thu Sep 1 15:15:06 CEST 2022

Hi Nigel,

You probably want logback 1.3 (1.4 is for Jakarta EE as opposed to 1.3
being for Java EE).

Secondly, logback now uses ServiceLoader to find "providers" so make sure
any adjustments are made to your classloading such that that can work.


On Thu, Sep 1, 2022 at 7:59 AM Nigel L Jones <jonesn at uk.ibm.com> wrote:

> Hi,
> I’m a maintainer on the open source Egeria project
> https://github.com/odpi/egeria.
>  We typically use slf4j in our Java 11 code, and depend on slf4j-api. Then
> in any ‘applications’ (a client tool, or a server) we include an
> implementation for logging, such as logback – specifically logback-classic
> We regularly update our dependencies and today I tried upgrading from
> logback 1.2.11 to 1.4.0. On doing so I see we now fail to startup, as slf4j
> is unable to find a logging implementation. Slf4j is at 2.0.0. We get an
> exception
> Caused by: java.lang.NoClassDefFoundError:
> org/slf4j/impl/StaticLoggerBinder
> Whilst this is an slf4j config issue in most regards, I wonder if the new
> logback version is not keeping slf4j happy with its implementation in some
> way
> I opened up an issue in our own bug tracker at
> https://github.com/odpi/egeria/issues/6884 which has the dependency tree
> & stack trace in full.
> Is there a change in the new version that’s caught us out? Any indications
> from the log? (If it is a logback issue happy to open up a bug report, but
> now knowing logback well figured I’d ask here first!)
> Many thanks
> Nigel Jones
> Unless otherwise stated above:
> IBM United Kingdom Limited
> Registered in England and Wales with number 741598
> Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user

*Raymond Augé* (@rotty3000)
Senior Software Architect *Liferay, Inc.* (@Liferay)
OSGi Fellow, Java Champion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20220901/a1ffb37c/attachment.html>

More information about the logback-user mailing list