2 Replies Latest reply on Jan 12, 2012 1:18 AM by jschellSomeoneStoleMyAlias

    ORA-01461: can bind a LONG value only for insert into a LONG column - Issue

    909732

      We are getting an error from Oracle DB --- Cause: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column

      The application was working fine with Oracle 10.2.0.4 and ojbc14 driver 10.2.0.1 Error occurs only after an upgrade to Oracle 10g 10.2.0.5. So after some googling, we found that a driver upgrade would eliminate this error. So the 10.2.0.5 version of the driver was used. But the ORA error still occurs. The readme of ojdb14.jar specified this - BUG 8847022 - ORA-01461: CAN BIND A LONG VALUE ONLY FOR INSERT INTO A LONG COLUMN

      The problem is that we are not able to reproduce this using a sample program however it is happening consistently in the client environment.

      we get the error ORA-01461, when the oracle version is upgraded to 10.2.0.5. This error occurs when we try to insert a file(BLOB) data with the file length greater than 4KB to a table.

      Exception trace

      uncategorized SQLException for SQL []; SQL state [72000]; error code [1461];
      --- The error occurred in nl/sss/gict/mcb/data/dao/config/StateQueries.xml.
      --- The error occurred while applying a parameter map.
      --- Check the setReceivedFile-InlineParameterMap.
      --- Check the statement (update failed).
      --- Cause: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
      ; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
      --- The error occurred in nl/sss/gict/mcb/data/dao/config/StateQueries.xml.
      --- The error occurred while applying a parameter map.
      --- Check the setReceivedFile-InlineParameterMap.
      --- Check the statement (update failed).
      --- Cause: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column


      Oracle version installed in acceptance:

      1 Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
      2 PL/SQL Release 10.2.0.5.0 - Production
      3 CORE 10.2.0.5.0 Production
      4 TNS for Linux: Version 10.2.0.5.0 - Production
      5 NLSRTL Version 10.2.0.5.0 - Production