File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes  java.sql.SQLException: Bigger type length than Maximum Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark " java.sql.SQLException: Bigger type length than Maximum" Watch " java.sql.SQLException: Bigger type length than Maximum" New topic
Author

java.sql.SQLException: Bigger type length than Maximum

vamsi pokala
Greenhorn

Joined: Aug 21, 2008
Posts: 1
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30506
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

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!


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: Bigger type length than Maximum