File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Selecting Data from Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Selecting Data from Oracle" Watch "Selecting Data from Oracle" New topic
Author

Selecting Data from Oracle

J James
Greenhorn

Joined: Feb 13, 2010
Posts: 8
Hi all,
Can someone please tell me what am I doing wrong here? What I'm trying to do is extract data from Oracle with functions and into XML
It keeps greeting me with NullPointerException error.

This page is excuted first;


Then comes here to write XML
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 643
So is the actual NullPointerException error you're getting a secret? At the very least, it will include the file and line where the error occurred, which will save folks a lot of time hunting through your code looking for what might be wrong.

J James
Greenhorn

Joined: Feb 13, 2010
Posts: 8

Thanks for your reply, sorry I couldn't post this before the Server went down.



Mark E Hansen wrote:So is the actual NullPointerException error you're getting a secret? At the very least, it will include the file and line where the error occurred, which will save folks a lot of time hunting through your code looking for what might be wrong.

Charles Owen
Ranch Hand

Joined: Aug 31, 2009
Posts: 61
Could the problem be line 36?



I am not sure why you have a CallableStatement and an OracleCallableStatement, but your CallableStatement variable callSP is set to null at line 4.
J James
Greenhorn

Joined: Feb 13, 2010
Posts: 8
Thank you.
Indeed it was line 36 I've just commented it out and it's working also made the amendments what you suggested.
many thanks
JJ

Charles Owen wrote:Could the problem be line 36?



I am not sure why you have a CallableStatement and an OracleCallableStatement, but your CallableStatement variable callSP is set to null at line 4.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Selecting Data from Oracle