Error ORA-01461 and Oracle ojdbc11.jar version

Issue

  • During upgrade to DXP 7.4 using an Oracle database, some errors happen with this pattern:
...
ORA-01461: can bind a LONG value only for insert into a LONG column_
...

Environment

  • Liferay DXP 7.4
  • ojdbc11.jar as database driver .

Resolution

  • We must have into account the OJDBC driver version used. Execute
java -jar ojdbc11.jar 

to get detailed version information.

  • A valid version (version 21) is like following:
Oracle 21.11.0.0.0 JDBC 4.3 compiled with javac 11.0.1 on Thu_Jun_15_06:23:55_PDT_2023
  • Whereas following is an invalid version (version 23) that causes issues with encondings and raises the ORA-01461 error:
Oracle 23.2.0.0.0 JDBC 4.3 debug compiled with javac 11.0.6 on Mon_Mar_20_06:37:20_UTC_2023

 

Additional Information

Refer to the Oracle correct OJDBC driver https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html

 

 

Was this article helpful?
0 out of 0 found this helpful