Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error while reading Key/ value pair fromprops from props file  RSS feed

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this question related to JDBC?!?

Besides, it is not even descriptive enough. But as a suggestion, you should be having a null check.
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Annie

I am using a web application and using IE 6.0, Tomcat 4.1,
 
author & internet detective
Sheriff
Posts: 38026
605
Eclipse IDE Java VI Editor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!