ORA-12899: Due to mix up in columns and bind variables. What can cause shift in columns/bind values?
Using Java 6, weblogic 10.3.6 and Oracle Driver Client : 11.2.0.3
Query run from Java application is as follows
insert into table_name (A,B,C,D, E, F) values('abcd','efgh','ijkl','abcd123456741345567adscefrhy','ABCXXX123','1234456789');
Length of columns
A - NVARCHAR2(20), B - NVARCHAR2(20), C - NVARCHAR2(20), D- NVARCHAR2(2000), E- NVARCHAR2(20), F - NVARCHAR2(20)
Exception thrown:
java.sql.SQLException: ORA-12899: value too large for column "table_name"."F" (actual: 28, maximum: 20)
If you look at the query column F has only 10 characters but column D has 28 characters. The system is mixing up the bind variables and columns