This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes Null Pointer Exception on Fectching values from Table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Null Pointer Exception on Fectching values from Table" Watch "Null Pointer Exception on Fectching values from Table" New topic
Author

Null Pointer Exception on Fectching values from Table

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 175
Hi Everyone,
I am getting NullPointer Exception on fetching values from the table. And sometimes if exception doesnt comes then result.next() gives "false" . Please guid me where i am going wrong... Thanks!!!
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30392
    
150

Which line is giving you the exception?

Also, when you run the query at the sql command line, does it return anything?

Finally, what is the value of "area" in the parameter?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 175

Hello Jeanne, Thanks for replying. Actually i got through this problem, It was coming because of my SILLIEST mistake. Sorry
 
wood burning stoves
 
subject: Null Pointer Exception on Fectching values from Table