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 unable to update CLOB data using Commons DBCP connection. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "unable to update CLOB data using Commons DBCP connection." Watch "unable to update CLOB data using Commons DBCP connection." New topic
Author

unable to update CLOB data using Commons DBCP connection.

Arnav Velimala
Ranch Hand

Joined: Jun 04, 2007
Posts: 37
Am trying to do update a clob column using a connection object that is retrieved using Apache DBCP connection pooling.

Earlier, I've implemented connection pooling using this and it was working fine i.e am able to update CLOB. I switched to DBCP because I was getting java.sql.SQLException: ORA-01000: maximum open cursors exceeded. I've checked connection, resultSet, preparedStatement objects in all the DAOs. All the finally blocks have these cursors closed. Still am facing this error and so decided to switch to DBCP.

But, when I try to update CLOB, with this DBCP connection, the application just hangs at pstmt.executeUpdate().



where getCLOB() method is:


I've tried by passing the ((DelegatingConnection) conn).getInnermostDelegate() connection, but no use.

Also, the same is happening when I try to 'SELECT the CLOB column FOR UPDATE'.

Am using Oracle 9i and the JDBC Oracle Driver version is above 10.

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: unable to update CLOB data using Commons DBCP connection.
 
Similar Threads
JDBC Update example using empty_clob() function
Use two connections individually for a clob selection and updating statment.
an example to insert data into Oracle Clob
help: lock problem during Clob update
java.lang.NullPointerException