• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

properties file in websphere

 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are working on a EJB application and websphere 6.0.
We are facing an issue regarding the properties file. We have a property file "ExceptionMessages_en_EX.properties" which contains list of exceptions

for example
p4154=User not terminated. Please select terminated user.

This property file is placed in IBM\WebSphere\AppServer\properties.

recently we have add a new key and value in ExceptionMessages_en_EX.properties for one of our testing environment.
But the application is unable to read that value and showing as null. Rest(old) are working fine.
when we fetch same front end code to our development system, its working

Is there any properties/settings has to change in websphere server level?
 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any suggestions please
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34863
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you restarted the app? Is it possible there is another copy of the property file somewhere?
 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Jeanne fro your reply.


Yes. we got that doubt also but there is no another copy of same file.

We have restarted the applictaion, server and system itself. We have done everything. But still the problem persists.
 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
finally we found that the properties file taking from different path.
 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have found that below code is loading the properties file from the path IBM\WebSphere\AppServer\properties

this.load(this.getClass().getResourceAsStream("/application.properties"));


Can any body help that where the rest of the path ( IBM\WebSphere\AppServer\ ) mentioned.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34863
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
naga eswar wrote:Can any body help that where the rest of the path ( IBM\WebSphere\AppServer\ ) mentioned.

It probably isn't. That API loads files from the classpath. It stands to reason IBM puts their home directory in the classpath of WebSphere.
 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Jeanne


Jeanne Boyarsky wrote: It stands to reason IBM puts their home directory in the classpath of WebSphere.


Can you explain in details regaridng. classpath of WebSphere means is it mention anywhere in the console.

My problem is that previously the application use to fetch properties files loaded from IBM\WebSphere\AppServer\properties.

now its loading from C:\IBM\WebSphere\AppServer\profiles\AppSrv01\properties

We dont know how its changed. can you please help us.

 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
naga eswar wrote:Thank you Jeanne


Jeanne Boyarsky wrote: It stands to reason IBM puts their home directory in the classpath of WebSphere.


Can you explain in details regarding this. classpath of WebSphere means is it mention anywhere in the console.

My problem is that previously the application use to fetch properties files loaded from IBM\WebSphere\AppServer\properties.

now its loading from C:\IBM\WebSphere\AppServer\profiles\AppSrv01\properties

We dont know how its changed. can you please help us.

 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Jeanne


Jeanne Boyarsky wrote: It stands to reason IBM puts their home directory in the classpath of WebSphere.


Can you explain in details regarding this. classpath of WebSphere means is it mention anywhere in the console.

My problem is that previously the application use to fetch properties files loaded from IBM\WebSphere\AppServer\properties.

now its loading from C:\IBM\WebSphere\AppServer\profiles\AppSrv01\properties

We dont know how its changed. can you please help us.

 
venkata mohan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you check your WebSphere Variables pat for WAS-Props_Dir value once

Login to the console --> Environment--> WebSphere Variables--> WAS-PROPS-DIR
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic