Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

location for log4j.properties for my EAR Application

 
Sonx Nkuks
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • 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?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic