logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Hufgard" <christian.hufg...@gmx.de>
Subject Problems with Classloader
Date Fri, 06 Feb 2004 13:38:20 GMT
Hi folks,

I know, this question is not really log4j-specific, but using log4j made me
have this problem *G*

I have the following structure:
shared/classes/log4j.app1.properties
webapps/app1/WEB-INF/classes/ServletXY
webapps/app1/WEB-INF/lib/log4j.jar
webapps/app1/WEB-INF/lib/my.jar

ServletXY calls a class from my.jar. This class reads log4j.app1.properties
and initializes log4j. So far, everything works fine. But the called class
also does some job, that is common for all webapps on this server (e.g. reading
log4j.appX.properties ...) so my structure should look like this:
shared/lib/my.jar
shared/classes/log4j.app1.properties
webapps/app1/WEB-INF/classes/ServletXY
webapps/app1/WEB-INF/lib/log4j.jar

But now I have the problem, that the called class from my.jar cannot find
the log4j-library located in WEB-INF/lib.

Is there any way to bypass this problem? Can I tell the Classloader in any
way to took in the directory I want it to look in? If i place my.jar back to
WEB-INF/lib I cannot use the feature that it creates an instance of a given
class that is common for all webapps, or can I do so?

Greets,

Christian

-- 
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message