I am using Spring JDBCTemplate to perform a batchUpdate (insert) of a few thousand rows into an Oracle 10g database. To test my error handling, I made sure I get an exception about maximum length.
I get the following (expected) exception:
Caused by: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO colleagues (col_id, col_code, col_description, pers_id) VALUES (?, ?, ?, ?)]; SQL state [72000]; error code [12899]; ORA-12899: value too large for column "MYSCHEMA"."COLLEAGUES"."COL_DESCRIPTION" (actual: 57, maximum: 40);
nested exception is java.sql.BatchUpdateException: ORA-12899: value too large for column "MYSCHEMA"."COLLEAGUES"."COL_DESCRIPTION" (actual: 57, maximum: 40)
My question is, what is the value of col_description causing this exception? As you can see, the query does not show the actual values but only the ? of the prepared statement.