I use ojdbc6-11.1.0.7.0 and when:
ps = connection.prepareStatement("Insert into A (b, C) values (?, ?)", Statement.RETURN_GENERATED_KEYS);
I get
java.lang.ArrayIndexOutOfBoundsException: 3
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.T4CPreparedStatement.<init>(T4CPreparedStatement.java:28)
at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:68)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3140)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3042)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:5890)
I just read about this bug here, but solution does not help because I use Statement.RETURN_GENERATED_KEYS feature.
Is there any other solution?