• 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

properties file in websphere

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any suggestions please
 
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
Have you restarted the app? Is it possible there is another copy of the property file somewhere?
 
naga eswar
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
finally we found that the properties file taking from different path.
 
naga eswar
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
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

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: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic