You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by simple solution <eb...@yahoo.com> on 2002/07/25 16:37:09 UTC

HELP cannot locate log4j.xml in an EAR

we are using log4j in an enterprise application (.ear).
the structure of the .ear is as follows:
camps.ear   |   +--> camps.war   +--> common.jar   +--> camps-ejb.jar   +--> log4j.jar   +--> and other stuff....
the structure of common.jar is as follows:
common.jar   |   +--> log4j.xml   +--> and other stuff . . . 
the problem is that when we execute an ejb (located in camps-ejb.jar), log4j cannot locate log4j.xml.
the camps-ejb.jar file has a Manifest.mf Class-Path entry that includes both log4j.jar and common.jar, and the DOMConfigurator class is executed:
java.io.FileNotFoundException: log4j.xml (The system cannot find the file specified)         at java.io.FileInputStream.open(Native Method)         at java.io.FileInputStream.(FileInputStream.java:59)         at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:583)         at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:694)         at com.gartner.camps.util.log.LogWrapper.start(Unknown Source)

we are using log4j-1.2.5 under weblogic 6.2, building with ant 1.5 and all under jdk1.3.1
can someone enlighten us on the classloader logistics behind finding the log4j.xml in the context of an ear?  is there a better convention that we would be advised to follow?
thanks in advance
ed bridges



---------------------------------
Do You Yahoo!?
New! SBC Yahoo! Dial - 1st Month Free & unlimited access