[slf4j-user] SLF4J and OSGi : LoggerFactory could not be successfully initialized

Hirt, Dominik Dominik.Hirt at wincor-nixdorf.com
Wed Jan 7 12:17:24 CET 2009


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

-- 
WINCOR NIXDORF International GmbH 
Sitz der Gesellschaft: Paderborn 
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller 
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. 




More information about the slf4j-user mailing list