• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

java.sql.SQLException: Bigger type length than Maximum

 
vamsi pokala
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Database product name : Oracle
DSRA8204I: Database product version : Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
With the Partitioning option

JDBC driver name : Oracle JDBC driver
DSRA8206I: JDBC driver version : 10.2.0.1.0

I am getting Bigger Type length than maximum for the following. I have been trying since last two days, still getting the same error.

My prepared statement is Insert
pst = conn.prepareStatement(s,PreparedStatement.RETURN_GENERATED_KEYS);


StringBuffer sql = new StringBuffer();

sql.append("INSERT INTO REGISTRATION(FIRSTNAME,LASTNAME,MINITIAL,SSN,HPHONE,MOBILE,EMAIL,");
sql.append("ADDRESS1,ADDRESS2,CITY,STATE,COUNTRY,ZIPCODE,SECQUESTION,SECQUESTIONANS,TPOLICY");
sql.append(",DOB,USERID,PWD,VENDOR,USERTYPE)");
sql.append(" VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

I have appropriate set methods for 20 parameters, and i captured Resultset for generated keys as follows.
while (rs.next()){
hm.put("Personid", rs.getInt(1));


}

Can Someone please let me know what is the problem and how to fix this. I validated all drivers for Oracle and still getting same problem.

I am using RAD 7 Version and Websphere version 6.1 and JDK 1.5.

Error Message is
[8/21/08 9:00:36:421 EDT] 0000001f SystemErr R java.sql.SQLException: Bigger type length than Maximum
[8/21/08 9:00:36:421 EDT] 0000001f SystemErr R at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
[8/21/08 9:00:36:421 EDT] 0000001f SystemErr R at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
[8/21/08 9:00:36:421 EDT] 0000001f SystemErr R at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
[8/21/08 9:00:36:421 EDT] 0000001f SystemErr R at oracle.jdbc.driver.T4CMAREngine.buffer2Value(T4CMAREngine.java:2493)
[8/21/08 9:00:36:421 EDT] 0000001f SystemErr R at oracle.jdbc.driver.T4CMAREngine.unmarshalUB2(T4CMAREngine.java:1177)
[8/21/08 9:00:36:421 EDT] 0000001f SystemErr R at oracle.jdbc.driver.T4CMAREngine.unmarshalSB2(T4CMAREngine.java:1149)
[8/21/08 9:00:36:421 EDT] 0000001f SystemErr R at oracle.jdbc.driver.T4CRowidAccessor.processIndicator(T4CRowidAccessor.java:78)
[8/21/08 9:00:36:421 EDT] 0000001f SystemErr R at oracle.jdbc.driver.T4CRowidAccessor.unmarshalOneRow(T4CRowidAccessor.java:224)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:610)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteUpdate(WSJdbcPreparedStatement.java:948)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:615)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at com.db.dao.RegInsertDAO.insertRegDetails(RegInsertDAO.java)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at com.policy.life.InsuranceWebService.newRegistration(InsuranceWebService.java:74)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at java.lang.reflect.Method.invoke(Method.java:615)
[8/21/08 9:00:36:437 EDT] 0000001f SystemErr R at org.apache.axis.provid

Any Help is appreciated.
 
Jeanne Boyarsky
author & internet detective
Posts: 39343
755
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vamsi,
The first step is to determine which column is giving you the error. One way to find out is to pass "" for all the strings and 1 for all the numbers until the error goes away.
 
Scott Selikoff
author
Posts: 4107
28
Google Web Toolkit Eclipse IDE Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of those errors in which the exception message is a wonderful thing rather than a vague description. If it's saying one of the inputs is too big, follow Jeanne's advice and determine of the input(s) is causing the problem. Don't ignore exception messages, sometimes they are useful!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!