• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bigger type length than Maximum  RSS feed

 
Arpana Sinha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm running the following JDBC snippet and getting the exception "java.sql.SQLException: Bigger type length than Maximum"..


Code Snippet
--------------
CallableStatement stmt = null;
stmt = dbservice.getConnection().prepareCall("{ call mailpack.GET_ROW_COUNT(?,?,?,?) }");
stmt.setString(1,dealerId);
stmt.setString(2,userType);
stmt.setString(3,viewSentReceived);
stmt.registerOutParameter(4,OracleTypes.CURSOR);
stmt.executeQuery();
Stack Trace
------------

java.sql.SQLException: Bigger type length than Maximum
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
at oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:884)
at oracle.jdbc.driver.T4CMAREngine.buffer2Value(T4CMAREngine.java:2230)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB2(T4CMAREngine.java:1047)
at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:111)
at oracle.jdbc.driver.T4CTTIdcb.receiveFromRefCursor(T4CTTIdcb.java:103)
at oracle.jdbc.driver.T4CResultSetAccessor.unmarshalOneRow(T4CResultSetAccessor.java:165)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:787)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:704)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:526)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:179)
at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:782)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1027)


The Database procedure works fine when run from backend.. and it produces a single cell output as a count....
But when called from the above JBDC snippet... it throws an exception...
I guess its a prob with the JDBC driver... pls get back if someone knows the solution...
 
Scott Selikoff
author
Bartender
Posts: 4085
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you successfully run from the backend with setting all of the first three parameters as strings with '' around them? That's all the setString() is doing.
[ May 05, 2008: Message edited by: Scott Selikoff ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!