• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

utterly stumped - NPE thrown when calling a method

 
Stuart Rogers
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
greetings all,

Eclipse/Hibernate/MySQL on WinXP

I've written a stand-alone app that reads from numerous files and creates lots of objects that get populated into tables.
I run this app within Eclipse.

It all works great up until the app calls a particular method ( a DAO method to be precise), which throws an NPE immediately.
It doesn't even enter the method - I've tried replacing the method's guts with a single print statement and return null. And I've
Placing the offending call within a try/catch block and printing the stack trace isn't much help, it just shows NPE. Commenting out
the call to the offending method and the app runs to completion w/o error - but of course at the price of not loading one of my tables.

the call


and the method itself


Any ideas? I fear the loss of the rest of my hair over this nuttiness.


TIA,


Still-learning Stuart
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the cteProgramDAO object reference null?
 
Stuart Rogers
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
==DOH!!!==

I declared an instance of CteProgramDAO but never instantiated it.

HATS OFF TO ULF!! You da MAN!!

CASE CLOSED


Still-learning Stuart ( whose learned not to try to program at 02:00 local time )
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Ulf da man
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic