Re: RefCursor works in SQL*Plus but not JDBC
- From: dsemmler@xxxxxxxxx
- Date: 28 Jun 2005 07:09:19 -0700
Thought I would post an update. With the 10 driver, even the local
database call returning a refcursor does not work properly. It throws
the same "Bigger type length than Maximum" exception.
Code snippet:
strSQL = "{ call pkg.func_name(?,?,?,?) }"; // returns refcursor
callStmt = dbConn.prepareCall(strSQL);
callStmt.setString(1, param1);
callStmt.setString(2, param2);
callStmt.setString(3, param3);
callStmt.registerOutParameter(4, OracleTypes.CURSOR);
callStmt.execute();
rsData = ((OracleCallableStatement)callStmt).getCursor(4);
============================
The call is dying on the execute command and has the following trace:
java.sql.SQLException: Bigger type length than Maximum at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:885)
at oracle.jdbc.driver.T4CMAREngine.buffer2Value(T4CMAREngine.java:2231)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB2(T4CMAREngine.java:1048)
at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:112) at
oracle.jdbc.driver.T4CTTIdcb.receiveFromRefCursor(T4CTTIdcb.java:104)
at
oracle.jdbc.driver.T4CResultSetAccessor.unmarshalOneRow(T4CResultSetAccessor.java:165)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:785)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:702)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:527) at
oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:180)at
oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:783)at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1027)at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2885)at
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2926)
Sorry for the formatting but I didn't see a way to mark snippets or
alter the size of the text to make it fit better.
.
- Follow-Ups:
- Re: RefCursor works in SQL*Plus but not JDBC
- From: joeNOSPAM@xxxxxxx
- Re: RefCursor works in SQL*Plus but not JDBC
- References:
- RefCursor works in SQL*Plus but not JDBC
- From: dsemmler
- RefCursor works in SQL*Plus but not JDBC
- Prev by Date: RefCursor works in SQL*Plus but not JDBC
- Next by Date: Re: RefCursor works in SQL*Plus but not JDBC
- Previous by thread: RefCursor works in SQL*Plus but not JDBC
- Next by thread: Re: RefCursor works in SQL*Plus but not JDBC
- Index(es):