Problem locating logback.xml from JEE deployment
------------------------------------------------
Key: LBCLASSIC-222
URL: http://jira.qos.ch/browse/LBCLASSIC-222
Project: logback-classic
Issue Type: Bug
Components: Other
Affects Versions: 0.9.21
Environment: Glassfish 2.1
Reporter: Rob Betgem
Assignee: Logback dev list
Logback seems to have a problem in locating the logback.xml configuration while
being deployed as part of an EAR app on Glassfish. This incapability exists
because the logback classic ContextInitializer class tries to locate the
resource through a local classloader instead of the current thread context
classloader. In some JEE app servers things are guaranteed to break if you try
to locate resources with local classloaders.
The findURLOfDefaultConfigurationFile method of the
ch.qos.logback.classic.util.ContextInitializer class retrieves its current
classloader with getClassLoader(). The current classloader returned during
glassfish startup is not able to sense to full context of the deployed ear. At
this startup stage it will return the ASURLClassloader instead of the needed
EJBClassLoader.
I fixed the problem by supplying the context class loader with
Thread.currentThread().getContextClassLoader().
Could anybody please change this in one of the future releases.
Thanks Rob
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev