[logback-user] ServletContainerInitializer cannot be found by ch.qos.logback.classic_1.4.8 (in OSGi application)

Ceki Gülcü ceki at qos.ch
Sun Jun 18 18:35:20 CEST 2023

Hello Benno,

jakarta.servlet.ServletContainerInitializer is a service declaration
found under logback-classic/META-INF/services/. It contains a reference
to the
ch.qos.logback.classic.servlet.LogbackServletContainerInitializer class.
This class ships with logback-classic.

There is also an instruction in logback-classic/pom.xml for the
maven-bundle-plugin declaring
jakarta.servlet.ServletContainerInitializer as a a service provided by

This is a recapitulation of the intended state and things should work
reasonably well in a OSGi environment.

Which OSGi platform/application are you using?

Ceki Gülcü

Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch

On 6/18/2023 5:35 PM, Benno Luthiger via logback-user wrote:
> Hello everybody,
> In my OSGi application, I use /ch.qos.logback.classic/ (1.4.8) for logging.
> For this reason I have included, among others, the bundle ch.qos.logback.classic_1.4.8. However, this leads to the following error message:
> /java.lang.ClassNotFoundException:
> jakarta.servlet.ServletContainerInitializer cannot be found by
> ch.qos.logback.classic_1.4.8/
> I get this error even when I have started the bundle jakarta.servlet-api_6.0.0 (containing jakarta.servlet.ServletContainerInitializer).
> How should I proceed to solve this problem?
> Best,
> Benno

More information about the logback-user mailing list