my dog learned polymorphism*
The moose likes JDBC and the fly likes problem with  CLOB.createTemporary Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem with  CLOB.createTemporary" Watch "problem with  CLOB.createTemporary" New topic
Author

problem with CLOB.createTemporary

Sudarshan Sreenivasan
Ranch Hand

Joined: Jun 28, 2007
Posts: 188

Hi,
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
error:

java.sql.SQLException: invalid arguments in call
04/08/27 11:56:44 at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
04/08/27 11:56:44 at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
04/08/27 11:56:44
atoracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:294)
04/08/27 11:56:44 at oracle.sql.CLOB.createTemporary(CLOB.java:527)
04/08/27 11:56:44 at appi.util.JUtils.getClob(JUtils.java:166)



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
Greenhorn

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);
 
jQuery in Action, 2nd edition
 
subject: problem with CLOB.createTemporary