2 Replies Latest reply on May 3, 2012 3:22 PM by rp0428

    Error using newer ojdbc versions

    777752

      Hi!

      we have some strange problems using different ojdbc version.

      first of all installed server version:
      select * from v$version;
      Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
      PL/SQL Release 11.2.0.2.0 - Production
      "CORE 11.2.0.2.0 Production"
      TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
      NLSRTL Version 11.2.0.2.0 - Production

      We wantet to upgrade jdbc version on client for performance issues (from 9.2.0.4 to 11.1.0.7).
      When starting our upgrade programs we got exceptions on every insert like this (it also happens with other tables, other applications,...):

      15:53:05,575 ERROR [AWT-EventQueue-0] gf.rdi.DefaultTableInsert (AnforderungsPositionen) :
      java.lang.ArrayIndexOutOfBoundsException: 17
      at oracle.jdbc.driver.OracleSql.computeBasicInfo(OracleSql.java:950)
      at oracle.jdbc.driver.OracleSql.getSqlKind(OracleSql.java:623)
      at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:1212)
      at oracle.jdbc.driver.OracleCallableStatement.<init>(OracleCallableStatement.java:104)
      at oracle.jdbc.driver.T4CCallableStatement.<init>(T4CCallableStatement.java:27)
      at oracle.jdbc.driver.T4CDriverExtension.allocateCallableStatement(T4CDriverExtension.java:88)
      at oracle.jdbc.driver.PhysicalConnection.prepareCall(PhysicalConnection.java:3216)
      at oracle.jdbc.driver.PhysicalConnection.prepareCall(PhysicalConnection.java:3171)

      and strange unique constraint violations

      Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: Unique Constraint (ACT3113QS_SAP_AT.I_RPO_ENTITYSEG2) verletzt
      ORA-06512: in Zeile 1
      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:85)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
      at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3468)
      at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:3878)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)

      The data can't be wrong, because same scripts work with the old version.

      insert statements look like

      DECLARE
      identityseg_out INTEGER;
      BEGIN
      INSERT INTO rpo_entityseg(identityseg,idowner,segnr,data_)
      VALUES (RPO_ENTITYSEG_IDENTITYSEG_S.NEXTVAL,?,?,?)
      RETURNING identityseg
      INTO :identityseg_out;
      END;

      We found a thread that told us to install newer versions (we tried with 11.2.0.2/3), but with them we have the same problems problems.
      [Problem with PreparedStatement creation (GeneratedKey kind) |https://forums.oracle.com/forums/thread.jspa?messageID=4594768]


      we've returned now to the old classes12.zip from 9.2.0.4 now, but we still have to upgrade later because of these performance issues, so does anybody of you know how to get rid of this problem?

        • 1. Re: Error using newer ojdbc versions
          777752
          Hi, guys.

          we already found the problem.

          newer ojdbc versions don't support named returning bindings:
          BEGIN
          INSERT INTO rpo_entityseg(identityseg,idowner,segnr,data_)
          VALUES (RPO_ENTITYSEG_IDENTITYSEG_S.NEXTVAL,?,?,?)
          RETURNING identityseg INTO :identityseg_out;
          END;

          instead we use these insert statements now (and it works):

          BEGIN
          INSERT INTO rpo_entityseg(identityseg,idowner,segnr,data_)
          VALUES (RPO_ENTITYSEG_IDENTITYSEG_S.NEXTVAL,?,?,?)
          RETURNING identityseg INTO ?;
          END;


          So, this thread can be closed :-)
          • 2. Re: Error using newer ojdbc versions
            rp0428
            >
            newer ojdbc versions don't support named returning bindings:
            >
            Glad you found your problem but can you provide more information about how you determined that or a citation to support it?