Hi,

I have found a minor bug when using the DOMConfigurator.
When I hava the log4j.jar file in the CLASSPATH everything is working fine
but when I put it in the jre/lib/ext/ directory it won't find my Filters,
Context class etc.
This is because the DOMConfigurator is loaded by the extension class loader
which is a parent of the application class loader.
The fix is quite simple:
istead of:
  Class.forName(className)
use:
  Class.forName(className, true,
   Thread.currentThread().getContextClassLoader())

Now there is always the right class loader used. When a class from the log4j
package is requested the application class loader will automatically ask the
extension class loader first.
I don't know how other configurators behave.

As I mentioned in an earlier post I made some extensions to log4j. Some
people already requested the source code. If nobody objects I will send it
with a small test example to the list packed in a jar file.
But I will have to clean it up from some Kelman specifics first.

Regards,

Ole
-- 
Ole Bulbuk             Fon://+49/30/6576/3724
Kelman GmbH            Fax://+49/30/6576/3601
Haus 40                mailto:[EMAIL PROTECTED]
Koepenicker Str. 325   http://www.Kelman.de
12555 Berlin, Germany

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to