Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes Getting nullpointer exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Getting nullpointer exception" Watch "Getting nullpointer exception" New topic

Getting nullpointer exception

dhaval thakor
Ranch Hand

Joined: Aug 27, 2012
Posts: 53

I am getting null pointer exception at line 24..
i could not find where i am stucking up..

Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

That would be because fee_master[0] is null.

Notice that you declare that "fee_master" array, at which point all of its entries are null. You don't have any code which changes that (i.e. by putting FEE_MASTER objects into the array) and so the entries are still all null when you start trying to use them.
dhaval thakor
Ranch Hand

Joined: Aug 27, 2012
Posts: 53

I would be very thankful for your answer..
Wendy Gibbons

Joined: Oct 21, 2008
Posts: 1107

I would be placing my debugging effort around the result set, I think you can only go round it once. Or maybe you don't have that column.
I agree. Here's the link:
subject: Getting nullpointer exception
Similar Threads
ORA-01000: maximum open cursors exceeded
select from DB
Prb in compiling the JSP
Please help...
how to connect to database in java class and fetch the database table