----- Original Message -----
From: "Adam Jack" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 13, 2002 10:36 AM
Subject: RE: error with Beta 3


> I found that commons-logging seems to use the ClassLoader for the Logger
as
> a key into a Hashtable of factories. Unfortunately my environment/usage
> returns 'null' for the class loader (which is valid per JDK 1.3
> documentation, my environment, to imply 'Boot ClassLoader') and the
> Hashtable and common-logging code puke on this.
>
> I posted a message to the commons mailing list, but I've receive no reply.

file a bugrep on nagoya.apache.org/bugzilla related to this; I dont know who
maintains commons-logging to offer any more advice.

> What I ended up doing was hacking the commons code to check for a null
> ClassLoader, and replacing it with ClassLoader.getSystemClassLoader(). I
am
> insufficiently versed in this stuff to know if System = Boot, and/or if I
> have future ClassCast worries to look forward to, but this seem to be
> working for me for now.

looks like a suitable workaround, but you need a java internals expert to be
sure. Ted? Are you reading this?

>
> That said -- just about anything that makes commons-logging unhappy (like
> not having a Log4j.properties in the 'right' place) seems to cause a
> NullPointerException from commons-logging. It seems that commons-logging
> does a poor job of logging anything if it's complex auto-configuration
> mechanism fails, a painful flaw.

Sounds like it is excessively brittle.

Reply via email to