I am inserting data via java code by fetching it from one DB and then inserting it into other system using its own API. I am printing the size of string before setting that string as name for the record and have put a check as well, if it exceeds more than 250 character then trim it to 250 characters. So name variable in java code always print length either 250 or less than that depending on the length of value of column. Even though it always less than or equal to 250 character but I am still getting error
ORA-12899: value too large for column "OWNER"."PROJECT"."NAME" (actual: 515, maximum: 250)
The target db column is having data type varchar(250 Byte)
I am facing this issue if name column is having Japanese or non English characters? Does anyone have any idea what to do at code level to prevent it?
P.S. The DB is Oracle 12c
I cannot show the code, due to some restriction. But I have double verified the code and it seems to be working fine for setting name with only english characters.
