Difficulty in resolving Date ORA-12899: value too large for column (merged) [message #439498] |
Sun, 17 January 2010 22:48  |
anjali.nalapure
Messages: 2 Registered: January 2010 Location: Pune
|
Junior Member |
|
|
Hi,
I am having great difficulty to resolve the following error for insert of date column in DB : java.sql.SQLException: ORA-12899: value too large for column
Oracle Database Version : 10.2.0.3.0
Oracle Client Version : 10.2.0.1.0
Oracle DB OS - Win2003 R2 E x64.
Oracle client OS - Windows 2003 R2 E x32
JDK version : 1.4
We have our software running on multile m/cs. Most of the places its working fine. But on one m/c, we are facing issue for the same code and same database.
On that m/c, 1000 sqls are executed successfully, but some times one of them fails and gives below error. This issue is very hard to reproduce. It comes once in a while but it has affected our software quality a lot.
Date is 'Wed Sep 30 00:00:00 CEST 2009'
Error is :-
java.sql.SQLException: ORA-12899: value too large for column "PRD_7"."SUMMARY_TABLE"."PERIOD_END_DT" (actual: 40, maximum: 7)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:671)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:597)
at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:570)
at oracle.jdbc.driver.T2CPreparedStatement.executeForRows(T2CPreparedStatement.java:763)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1159)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3367)
This problem has really show stopper to us and I cannot see how to resolve it.
Can someone, please help me?
|
|
|
|
Re: Difficulty in resolving Date ORA-12899: value too large for column [message #439502 is a reply to message #439498] |
Sun, 17 January 2010 22:57   |
ayush_anand
Messages: 417 Registered: November 2008
|
Senior Member |
|
|
ORA-12899: value too large for column string (actual: string, maximum: string)
Cause: An attempt was made to insert or update a column with a value which is too wide for the width of the destination column. The name of the column is given, along with the actual width of the value, and the maximum allowed width of the column. Note that widths are reported in characters if character length semantics are in effect for the column, otherwise widths are reported in bytes.
Action: Examine the SQL statement for correctness. Check source and destination column data types. Either make the destination column wider, or use a subset of the source column (i.e. use substring).
can you post details of your SUMMARY_TABLE?
you can find this by typing
in SQL*Plus client
[Updated on: Sun, 17 January 2010 23:00] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Difficulty in resolving Date ORA-12899: value too large for column [message #439520 is a reply to message #439506] |
Mon, 18 January 2010 02:19   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
anjali.nalapure wrote on Mon, 18 January 2010 06:22My date format is yyyyMMddHHmmss. However this works fine on same server always. sometimes it fails and its very hard to reproduce.
Sounds to me like your java program does not use a Date as bind parameter, but a String.
This would imply your error is in the java code (it should use the proper datatypes, so invalid values can be checked where they ought to be checked)
[Edit: hm, considering the error message, your database-column seems to be of a VARCHAR2 type as well, instead of a DATE]
[Updated on: Mon, 18 January 2010 02:21] Report message to a moderator
|
|
|
|
|