Oracle Weblogic Server (MOSC)

MOSC Banner

ORA-12899: Due to mix up in columns and bind variables. What can cause shift in columns/bind values?

edited Apr 8, 2022 2:40PM in Oracle Weblogic Server (MOSC) 2 commentsAnswered

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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center