• 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

location for log4j.properties for my EAR Application

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i have the following project structure : MyProjEAR, MyProjEJB, MyProjEJBClient, MyProjTestApp, MyProjConfig ... I've put my hibernate.cfg and log4j.properties in the MyProjConfig/properties project folder and added this folder on my MyProjTestApp Java Application build path. I can see the logs on output when i run my java App but get

MyProjManagerServiceImpl class uses LOGGER and is within the MyProjEJBClient project packages... As this is deployed on the WebSphere server (with EAR), where or how do i reference my log4j.properties? should i include the properties folder in each project build path?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sonx,
In JEE there are two types of paths. The build path is a compile time path. At runtime another path is used which is the manifest.mf classpath plus any other classpaths defined on your server. I recommend adding the MyProjConfig/properties directory to your server's classpath.
 
Sonx Nkuks
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Sonx,
In JEE there are two types of paths. The build path is a compile time path. At runtime another path is used which is the manifest.mf classpath plus any other classpaths defined on your server. I recommend adding the MyProjConfig/properties directory to your server's classpath.



Hi Jeanne , i tried googling on how to add libraries or configuration to WAS classpath but not quite sure i got correct answer. Should i add this as shared library reference or just copy the log4j.properties to <WAS_ROOT>/properties folder? What/where exactly can i add external folders or worskpace folders to WAS classpath?
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's under Java and Process Management in the admin console. The exact location will depend on your version of WebSphere.
 
It's a tiny ad. At least, that's what she said.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic