• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

using Log4j WSAD

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i'm using Log4j for logging in my application Which is in WSAD.

I put the commons-logging.properties and log4j.properties under


web-inf\classes


and log4j-1.2.8.jar under web-inf\lib folder.

While running it is giving error messages like

log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
[10/11/04 11:27:13:375 IST] 2460ca7b SystemErr R log4j:WARN Please initialize the log4j system prop

what is the solution for that
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear bala.

first you try this

Create a folder in inside web-inf and place your log4j into same folder.

but placing log4 inside web-inf will make it available to web Container only
 
siva kumar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
Shailesh i have done that.

Still it's giving same error.

log4j.xml to be in the same folder or what.

thanx for your help
 
Shailesh Chandra
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Bala ,

I am not aware that how you are implementing log4j but I explain you my implemtaion. This may Help you.

1) We have imported following classes

org.apache.log4j.Logger;
org.apache.log4j.PropertyConfigurator;

2) Then we are intialiazing out log4j by

PropertyConfigurator.configure(fileName) here file name is complete path of log4j.properties.

I think you are using log4j.xml instead of log4j.properties but that hardly makes any difference.

3) since we are using logger in ejb container also hence I had to put log4j.jar in my application lib instead of web-inf\lib

tell me how you are initialiazing your configuraion of log4j
[ October 11, 2004: Message edited by: Shailesh Chandra ]
 
siva kumar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Shailesh

thanx 4 your coop.

I have got it.

it's working fine.

raja
 
reply
    Bookmark Topic Watch Topic
  • New Topic