This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 30356
    
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Null Pointer Exception on Fectching values from Table