File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes problem with  CLOB.createTemporary Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "problem with  CLOB.createTemporary" Watch "problem with  CLOB.createTemporary" New topic

problem with CLOB.createTemporary

Sudarshan Sreenivasan
Ranch Hand

Joined: Jun 28, 2007
Posts: 188

i am trying to store a value to a CLOB in my databse,
everything is fine with a simple Connection created with DriverManager,
but when i use DataBase Connection Pooling (DBCP) from one of these servlet-engines i got the same

java.sql.SQLException: invalid arguments in call
04/08/27 11:56:44 at
04/08/27 11:56:44 at
04/08/27 11:56:44
04/08/27 11:56:44 at oracle.sql.CLOB.createTemporary(
04/08/27 11:56:44 at appi.util.JUtils.getClob(

i am using oracle 10g and oc4j as the container i have the requiste jar files in place.

Please also refer to the below link for detailed explanation of the problem
Link Describing Clob problem

The first post on the above problem exactly describes the issur i am facing,
however the solution given the last post does not help me out

Any help advice will be greatly appreciated

Thanks in advance
Sudarshan Sreenivasan
[ July 25, 2008: Message edited by: sid sree ]
mark walter

Joined: Jun 20, 2008
Posts: 15
What do you do with the CLOB object after you create it?

CLOB tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
tempClob.putString(1, data);
I agree. Here's the link:
subject: problem with CLOB.createTemporary
It's not a secret anymore!