Recently developed a J2EE project, using the database oracle, occasionally found ORA-01461canbindaLONGvalueonlyforinsertinto during the test
Recently developed a J2EE project, using the database is oracle, the test process found occasionally ORA-01461 can bind a LONG value only for insert
Recently developed a J2EE project, using the database is Oracle, the test process found that occasionally there is a ORA-01461 can bind a LONG value only for insert into a LONG column exception thrown, at first, an exception was thrown because the database field length was not enough. After the check, it was found that the above exception was thrown only when the field inserted to the database was in Chinese. If the field was in English, it would be completely normal. Is it about database encoding? After half a day of work, I found that the result was still the same.
When everyone was unable to cope, they suddenly thought of the project's initial preparation period. The project team used an oracle-driven ojdbc14.jar with the version 10.1.0.2 and the database version 10.2.0.1, is it because the driver version does not match? With this in mind, I checked it online and found that there was such a bug in ojdbc14 10.1.0.2, which was listed on the official oracle website. So download ojdbc14 of 10.2.0.1 immediately, replace the original jar package, restart the service, test, and OK!