• 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

utterly stumped - NPE thrown when calling a method

 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the cteProgramDAO object reference null?
 
Stuart Rogers
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 )
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, Ulf da man
 
reply
    Bookmark Topic Watch Topic
  • New Topic