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 Ying Zhe <zh...@yahoo.com> on 2002/08/23 00:01:48 UTC

log4j configuration in wsad 4.0.3

Hi all,

I'm currently using log4j 1.2.6 and here is the
envrionment: for development, I'm using WSAD 4.0.3 and
for production we have WebSphere App Sever 4.03. I
have an ejb project and a web project under one
enterprise application project within WSAD. I use
Struts as our presentation framework and Session EJBs
for business layer.  Here is my problem with using
log4j within WSAD:

I have log4j configured separately for the web module
and ejb module and I'm able to logging sucessfully
using the default initialization.  But for ejb module,
I'm having problem reading the configuration file.  My
understanding is that, WSAD 4.0.3 test envrionment is
in compliant with the J2EE classloading standard.  So
I put both log4j.jar and log4j.properties in the /lib
directory of the enterprise application project and
also has an entry in the manifest file of the ejb
project:

Manifest-Version: 1.0
Class-Path: lib/log4j-1.2.6.jar /lib

The classes are loaded sucessfully, but the
log4j.properties file can not seem to be loaded. I
have an io exception stating that log4j.properties can
not be found when I run my app. Did anyone come across
the same problem?  Any insight will be greatly
appreicated!!

Thanks,


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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


Re: log4j configuration in wsad 4.0.3

Posted by Ying Zhe <zh...@yahoo.com>.
Ceki,

Thank you for your response. As you said, WebSphere
did have its own complex classloading mechanism up
until 4.0.3. The WebSphere 4.0.3(which is the platform
that I'm using now) has the standard J2EE classloading
mechanism. I checked the menifest file but found that
I made a typo in my email -- I did have lib/ as the
entry in the manifest file(not /lib as I put in my
email). The interesting thing is that when I deployed
the application to the Single server edition of
WebSphere(which should be exactly the same as the test
envrionment within WSAD), everything works fine. So
I'm thinking maybe there is something wrong with the
test environment within WSAD.

Ying      


--- Ceki G�lc� <ce...@qos.ch> wrote:
> 
> Websphere has a rather complex class loading
> mechanism. See for example 
>
http://www.theserverside.com/resources/article.jsp?l=ClassLoading
> 
> In your particular case, shouldn't the Class-Path
> directive read:
> 
> Class-Path: lib/log4j-1.2.6.jar lib/
> 
> I think the trailing slash (/) is required. Let us
> know if this helps.
> 
> At 15:01 22.08.2002 -0700, you wrote:
> >Hi all,
> >
> >I'm currently using log4j 1.2.6 and here is the
> >envrionment: for development, I'm using WSAD 4.0.3
> and
> >for production we have WebSphere App Sever 4.03. I
> >have an ejb project and a web project under one
> >enterprise application project within WSAD. I use
> >Struts as our presentation framework and Session
> EJBs
> >for business layer.  Here is my problem with using
> >log4j within WSAD:
> >
> >I have log4j configured separately for the web
> module
> >and ejb module and I'm able to logging sucessfully
> >using the default initialization.  But for ejb
> module,
> >I'm having problem reading the configuration file. 
> My
> >understanding is that, WSAD 4.0.3 test envrionment
> is
> >in compliant with the J2EE classloading standard. 
> So
> >I put both log4j.jar and log4j.properties in the
> /lib
> >directory of the enterprise application project and
> >also has an entry in the manifest file of the ejb
> >project:
> >
> >Manifest-Version: 1.0
> >Class-Path: lib/log4j-1.2.6.jar /lib
> >
> >The classes are loaded sucessfully, but the
> >log4j.properties file can not seem to be loaded. I
> >have an io exception stating that log4j.properties
> can
> >not be found when I run my app. Did anyone come
> across
> >the same problem?  Any insight will be greatly
> >appreicated!!
> >
> >Thanks,
> 
> --
> Ceki
> 



__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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


Re: log4j configuration in wsad 4.0.3

Posted by Ceki Gülcü <ce...@qos.ch>.
Websphere has a rather complex class loading mechanism. See for example 
http://www.theserverside.com/resources/article.jsp?l=ClassLoading

In your particular case, shouldn't the Class-Path directive read:

Class-Path: lib/log4j-1.2.6.jar lib/

I think the trailing slash (/) is required. Let us know if this helps.

At 15:01 22.08.2002 -0700, you wrote:
>Hi all,
>
>I'm currently using log4j 1.2.6 and here is the
>envrionment: for development, I'm using WSAD 4.0.3 and
>for production we have WebSphere App Sever 4.03. I
>have an ejb project and a web project under one
>enterprise application project within WSAD. I use
>Struts as our presentation framework and Session EJBs
>for business layer.  Here is my problem with using
>log4j within WSAD:
>
>I have log4j configured separately for the web module
>and ejb module and I'm able to logging sucessfully
>using the default initialization.  But for ejb module,
>I'm having problem reading the configuration file.  My
>understanding is that, WSAD 4.0.3 test envrionment is
>in compliant with the J2EE classloading standard.  So
>I put both log4j.jar and log4j.properties in the /lib
>directory of the enterprise application project and
>also has an entry in the manifest file of the ejb
>project:
>
>Manifest-Version: 1.0
>Class-Path: lib/log4j-1.2.6.jar /lib
>
>The classes are loaded sucessfully, but the
>log4j.properties file can not seem to be loaded. I
>have an io exception stating that log4j.properties can
>not be found when I run my app. Did anyone come across
>the same problem?  Any insight will be greatly
>appreicated!!
>
>Thanks,

--
Ceki


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


RE: log4j configuration in wsad 4.0.3

Posted by Ying Zhe <zh...@yahoo.com>.
Wilfred,

I created the /lib directory under my enterprise
application project just as an indication of a place
to hold all the dependency libraries. You can put all
the libaries directly under the root of enterprise
application(root of the ear file) and things should
work the same.  

--- Wilfred Ho <wi...@qualicom.com> wrote:
> Ying,
> 
> I am using WSAD 4.0.3 also. I don't see a lib
> directory in my EJB module.
> Did you create it yourself? Suppose my ebj directory
> is ejbModule. Where is
> lib located?
> 
> -----Original Message-----
> From: Ying Zhe [mailto:zhe_ying@yahoo.com]
> Sent: Thursday, August 22, 2002 6:02 PM
> To: log4j-user@jakarta.apache.org
> Subject: log4j configuration in wsad 4.0.3
> 
> 
> Hi all,
> 
> I'm currently using log4j 1.2.6 and here is the
> envrionment: for development, I'm using WSAD 4.0.3
> and
> for production we have WebSphere App Sever 4.03. I
> have an ejb project and a web project under one
> enterprise application project within WSAD. I use
> Struts as our presentation framework and Session
> EJBs
> for business layer.  Here is my problem with using
> log4j within WSAD:
> 
> I have log4j configured separately for the web
> module
> and ejb module and I'm able to logging sucessfully
> using the default initialization.  But for ejb
> module,
> I'm having problem reading the configuration file. 
> My
> understanding is that, WSAD 4.0.3 test envrionment
> is
> in compliant with the J2EE classloading standard. 
> So
> I put both log4j.jar and log4j.properties in the
> /lib
> directory of the enterprise application project and
> also has an entry in the manifest file of the ejb
> project:
> 
> Manifest-Version: 1.0
> Class-Path: lib/log4j-1.2.6.jar /lib
> 
> The classes are loaded sucessfully, but the
> log4j.properties file can not seem to be loaded. I
> have an io exception stating that log4j.properties
> can
> not be found when I run my app. Did anyone come
> across
> the same problem?  Any insight will be greatly
> appreicated!!
> 
> Thanks,
> 
> 
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.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>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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


RE: log4j configuration in wsad 4.0.3

Posted by Wilfred Ho <wi...@qualicom.com>.
Ying,

I am using WSAD 4.0.3 also. I don't see a lib directory in my EJB module.
Did you create it yourself? Suppose my ebj directory is ejbModule. Where is
lib located?

-----Original Message-----
From: Ying Zhe [mailto:zhe_ying@yahoo.com]
Sent: Thursday, August 22, 2002 6:02 PM
To: log4j-user@jakarta.apache.org
Subject: log4j configuration in wsad 4.0.3


Hi all,

I'm currently using log4j 1.2.6 and here is the
envrionment: for development, I'm using WSAD 4.0.3 and
for production we have WebSphere App Sever 4.03. I
have an ejb project and a web project under one
enterprise application project within WSAD. I use
Struts as our presentation framework and Session EJBs
for business layer.  Here is my problem with using
log4j within WSAD:

I have log4j configured separately for the web module
and ejb module and I'm able to logging sucessfully
using the default initialization.  But for ejb module,
I'm having problem reading the configuration file.  My
understanding is that, WSAD 4.0.3 test envrionment is
in compliant with the J2EE classloading standard.  So
I put both log4j.jar and log4j.properties in the /lib
directory of the enterprise application project and
also has an entry in the manifest file of the ejb
project:

Manifest-Version: 1.0
Class-Path: lib/log4j-1.2.6.jar /lib

The classes are loaded sucessfully, but the
log4j.properties file can not seem to be loaded. I
have an io exception stating that log4j.properties can
not be found when I run my app. Did anyone come across
the same problem?  Any insight will be greatly
appreicated!!

Thanks,


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.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>