>Interesting problem. However, I am not sure I understand it fully. First, 
>which application server is this? JBoss? Weblogic? Orion? WebSphere?

I'm using the reference implementation from SUN.
The error message I got is:

log4j:ERROR No appenders could be found for category.
log4j:ERROR Please initialize the log4j system properly.

This is because the log4j.properties file cannot be found by the 
classloader that loaded the log4j library.

>Well, that is true only if classloaderB and classloaderA are not related 
>in a parent/child relationship. Otherwise, if classloaderA is the parent 
>of classloaderB, then classloaderB can and will delegate resource finding 
>to it its parent. Hence, if classloaderA can see it, so can classloaderB 
>(assuming a parent child relationship).

I think the classloading with the RI works more or less like this: 
classloaderA is the parent of classloaderB. ClassloaderA is used at startup 
of the application server. But classloaderA cannot see the classes of the 
ready to deploy applications because at the time the application server 
starts up, it does not have knowledge of the applications that are going to 
be deployed... These applications are loaded using classloaderB who can 
delegete creation of external classes (for example an XML parser, the log4j 
classes, ...) to it's parent (classloaderA). But since only classloaderB 
can reach the log4j.properties file and classloaderA is not a child of 
classloaderB, classloaderA cannot find the properties file when creating 
the Category instance.

Maarten

--
Maarten Coene
Katholieke Universiteit Leuven
Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
Celestijnenlaan 200A
B-3001 Heverlee



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

Reply via email to