[slf4j-user] SLF4J and OSGi : LoggerFactory could not be successfully initialized
ekkehard
ekkehard at gentz-software.de
Wed Jan 7 12:29:29 CET 2009
hi dominik,
slf4j and logback should work perfect under OSGI (equinox)
perhaps you find some ideas from my blog series "Logging in OSGI
Enterprise apps"
http://ekkes-corner.org
or - in german - http://ekkes-ecke.org
I'll continue the blog next week talking about the newest releases
and also some tools like lilith
ekke
Hirt, Dominik schrieb:
> Hi,
>
> I try to use SLF4J together with LOGBACK within an OSGi Runtime Environment within Eclipse.
> I use the 'official' OSGi bundle com.springsource.slf4j.api-1.5.6.jar from SpringSource and create two OSGi bundles with Eclipse for LogBack.core and Logback.classic for current 0.9.14 because there are only 0.9.9 bundle existing on SpringSource repository.
> My application bundles requires all those bundles and I try to get the logger by
>
> final Logger logger = LoggerFactory.getLogger(Activator.class);
>
> During runtime, nothing happens the application bundles remains in RESOLVED osgi state and if I try to start it manually on the Eclipse OSGi console I've got the following Exception:
>
> Caused by: java.lang.IllegalStateException: org.slf4j.LoggerFactory could not be successfully initialized. See also http://www.slf4j.org/codes.html#unsuccessfulInit
> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:242)
> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208)
> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221)
> at com.wincor.client.main.Activator.<init>(Activator.java:10)
>
> Unfortunately, the mentioned URL doesn't exists...
>
> Additionally, I create a fragment bundle for logback.core with the logback.xml config file, but with the same result....
>
> What is the reason for the exception and how I can fix my setup ?
>
> Kind regards
> Dominik
>
> --------------------------------------------
> Dipl.-Inf. Dominik Hirt
>
> Wincor Nixdorf International GmbH
> BD PSD 7,
> Hauptstraße 103
> 04416 Markkleeberg
>
> Tel. : +49 341 35413 57
> mailto:Dominik.Hirt at Wincor-Nixdorf.com
>
>
More information about the slf4j-user
mailing list