It's not a secret anymore!
The moose likes Java in General and the fly likes NullPointerException in prepareStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "NullPointerException in prepareStatement" Watch "NullPointerException in prepareStatement" New topic
Author

NullPointerException in prepareStatement

mangesh lele
Greenhorn

Joined: Jan 17, 2003
Posts: 18
could someone please tell me what are the reasons why a null pointer exception is thrown in a Connection prepareStatement(String) call?
I am generating the required insert statement given below and passing it to prepareStatement :
Insert into o1pay.product_pay ( AMT_LMT_DEF_CCY,.........40 odd fields ) values ( ?,........same number of question marks )
the logs are as follows:
java.sql.SQLException: java.lang.NullPointerException
at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:86)
.
.
.
.
.
.
.
furthermore, this error started happening when i moved my weblogic application setup from one database to another database, apparently identical to the first. the only thing i changed was the database url in connection pool tag of config.xml (weblogic 6.1)
thanks in advance
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: NullPointerException in prepareStatement
 
Similar Threads
insert query not executing..
Query about Connection Object
inserting an image in to database
Does jboss support pool of preparedstatement?
Select query not working with Jdbc for transactional calls.