Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems inserting XmlType/Clob in Oracle 9i under wls 7.1

1 view
Skip to first unread message

Ashish Agarwal

unread,
Jan 6, 2004, 12:41:39 PM1/6/04
to

I have been struggling with trying to insert an xml document using
XMLType in orcale database using WeLogic connection pool. I am using
Oracle 9.1 drivers (classes12.zip) and weblogic 7 sp1

I am trying to insert it as a clob using :
"INSERT INTO order_info
(order_id,contract_id,create_user,create_date,order_xml) VALUES( ?,
?,?,?, empty_clob())";

I get following exception. I have verified that all the datatypes are
correct. Any ideas what am I doing wrong ?

Also, if someone has a code snippet on using weblogic connection pool
to insert clobs, that will be very helpful.

thanks,
Ashish.

The exception that i am getting is :

java.sql.SQLException: ORA-00932: inconsistent datatypes: expected
NUMBER got CL
OB

at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:109
3)
at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.ja
va:2047)
at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
a:1940)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:2709)
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
edStatement.java:589)

Shankar

unread,
Feb 3, 2004, 8:38:16 PM2/3/04
to

Try,

INSERT INTO order_info (order_id,contract_id,create_user,create_date,order_xml)
VALUES( ?, ?,?,?, XMLType.createXML(' '))";

----

0 new messages