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:47:23 UTC

cannot locate log4j config in an EAR (repost)

(sorry for the duplicate posting, previous one all
formatting was stripped out).

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!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cannot locate log4j config in an EAR (repost)

Posted by Edward Zarecor <ed...@harvard.edu>.
>From Weblogic 6.1SP3 release notes:

069506

ClassLoader.getResources is now working when trying to access an XML file
which is in the Class-Path: entry of the EJB's manifest file.

You say you're using WL6.2, but I assume you mean 6.1SP2.

The release notes can be found here:
http://e-docs.bea.com/wls/docs61/notes/bugfixes2.html#1146364

Ed.

----- Original Message -----
From: "simple solution" <eb...@yahoo.com>
To: <lo...@jakarta.apache.org>
Sent: Thursday, July 25, 2002 10:47 AM
Subject: cannot locate log4j config in an EAR (repost)


> (sorry for the duplicate posting, previous one all
> formatting was stripped out).
>
> 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!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>