Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.NullPointerException

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,



I am calling this method like:


but sometime its throw the following NPE:


Thanks & best regards
 
Matthew Brown
Bartender
Posts: 4568
9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So which line does it throw it on? I can see it's line 710 in the source file - how does that correspond to the code you've posted?
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its time for debugging..

as Exception already point you the method.


use System.out.println before and after inside isCvExist method under if statement or use IDE debugger, you can use Netbeans for it.
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matthew Brown wrote:So which line does it throw it on? I can see it's line 710 in the source file - how does that correspond to the code you've posted?


I am thankful to you Metthew.
email = email.toLowerCase(); was on line 710 that was coming NULL I fixed and now its running fine

Thanks again from the bottom of my heart

Best regards
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome! I didn't really do anything, though - just suggested you look more closely at the error the computer was giving you. You solved the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic