File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Error while reading Key/ value pair fromprops from props file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Error while reading Key/ value pair fromprops from props file" Watch "Error while reading Key/ value pair fromprops from props file" New topic
Author

Error while reading Key/ value pair fromprops from props file

Srinivasa Kadiyala
Ranch Hand

Joined: Jun 10, 2004
Posts: 237
I am pulling the informatiom from a props file. Using

MessageResource props=MessageResources.getMessageResources("resources.ApplicationResources");
props.getMessage("key");

Some times it is fine and some times the code is not pulling the value and throwing null value and subsequently nul pointer exception.
Using IE 6.0.


Srini
Annie Smith
Ranch Hand

Joined: Mar 05, 2005
Posts: 172
Is this question related to JDBC?!?

Besides, it is not even descriptive enough. But as a suggestion, you should be having a null check.


Cheers!<br /><b>Annie</b>
Srinivasa Kadiyala
Ranch Hand

Joined: Jun 10, 2004
Posts: 237
sorry to all seeing JDBC area.... I posted here by mistake. Request the concerned to move to Java(Intermediate) area.

I will check for null and already implemented that.

my question is that why it is getting null some times only?

Thanks in advance
Annie Smith
Ranch Hand

Joined: Mar 05, 2005
Posts: 172
Originally posted by Puthriah Sarma:

my question is that why it is getting null some times only?


Like I already mentioned, your post is not descriptive enough. Are you using a web application or a standalone one? ...
Srinivasa Kadiyala
Ranch Hand

Joined: Jun 10, 2004
Posts: 237
Hi Annie

I am using a web application and using IE 6.0, Tomcat 4.1,
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26168
    
  66

Moving as requested


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Error while reading Key/ value pair fromprops from props file
 
Similar Threads
Commons Digester: FileNotFound Exception
String Tokens
Need help on JNDI DataSource in JBOSS?
Session Factory in Logs
Using props file for Stored functions and procedures