Selecting ROWNUM Pseudo Column Fails with ORA-1446 if ResultSet.TYPE_SCROLL_SENSITIVE Is Specified. (Doc ID 2135872.1)

Last updated on MAY 11, 2016

Applies to:

JDBC - Version 12.1.0.1.0 to 12.1.0.2.0 [Release 12.1]
Information in this document applies to any platform.

Symptoms

If the program specifies ResultSet.TYPE_SCROLL_SENSITIVE; for example:


selecting ROWNUM pseudo column fails with :

ORA-1446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc.
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:461)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:402)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1108)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:541)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:264)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:598)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:249)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:70)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:1062)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1148)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1512)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:5767)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:5848)
at oracle.jdbc.driver.OracleStatement.refreshRowsInternal(OracleStatement.java:6666)
at oracle.jdbc.driver.OracleStatement.refreshRows(OracleStatement.java:6556)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.refreshRows(InsensitiveScrollableResultSet.java:2850)
at oracle.jdbc.driver.SensitiveScrollableResultSet.refreshRows(SensitiveScrollableResultSet.java:508)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.refreshRow(InsensitiveScrollableResultSet.java:2141)
... 3 more

The issue ouucrs with JDBC 12.1.0.2 and 12.0.1, but it does not reproduce with JDBC 11.2.0.4.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms