[logback-user] Manually force the initialization of Logback

GF ganfab at gmail.com
Thu Sep 20 09:59:50 CEST 2012

Hello everyone,
I've a very uncommon configuration.
I'm on SAP Netweaver AS :-(
For some class loading reasons, I need to deploy separately a .ear
file containing the Hibernate .jar files and all the  .jar
dependencies of hibernate (including log4j, slf4j-api and
commons-logging) as a so called by SAP, "heavy resource"

Then I deploy separately the application .ear that does NOT contain
the .jar already  included in the hibernate .ear
With log4j it worked.

Now if...
1) I include all the logback libraries in the hibernate .ear I don't
get any error, but when I deploy the application .ear logback doesn't
start working! probably because the logback-* files are not in that
.ear and they doesn't look for the logback.xml (that I included
correcty, and locally on tomcat works...)

And if..
2) I include all logging related libraries in the application .ear
when some of the classes of hibernate (that are in the other .ear) try
to use something about logging, they got a class not found exception..

I'm totally confused, I'm trying to divide the libraries in many
different combinations, but I didn't find any working solution.

I think the case 1) might be ok, but I need to force the
initialization of logback from the application.ear (that does not
contain its libraries)
How can I do that? can someone give me a SVN link to the code that
starts all the logback stuff? I can even create just that class in my
application to force logback initialization..


More information about the Logback-user mailing list