From: <no...@at...> - 2005-06-28 14:26:57
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-682 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-682 Summary: setFetchSize() causes problems in Oracle JDBC 9.2.0.5 Type: Bug Status: Unassigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Versions: 3.0.5 Assignee: Reporter: Serge P. Nekoval Created: Tue, 28 Jun 2005 9:25 AM Updated: Tue, 28 Jun 2005 9:25 AM Environment: Oracle JDBC driver 9.2.0.5 Description: Code sample below: ScrollableResults results = session .createQuery("from myEntity") .setFetchSize(100000) .scroll(ScrollMode.FORWARD_ONLY); SQL Error: 17068, SQLState: null java.sql.SQLException: Invalid argument in: setFetchSize at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.driver.OracleStatement.setPrefetchInternal(OracleStatement.java:1727) at oracle.jdbc.driver.OracleStatement.setFetchSize(OracleStatement.java:6760) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1190) at org.hibernate.loader.Loader.scroll(Loader.java:1634) at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443) at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291) at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960) at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62) However, the code works fine under Oracle 8i driver. If you look at JDBC 2.0 docs, fetch size must be in range 0 <= fetchSize <= statement.getMaxRows(). My guess is that Oracle 9 driver checks this condition, and it appears that getMaxRows() returns zero. I tried a workaround with setMaxResults() on Hibernate's Query, but it doesn't seem to call statement.setMaxRows(), using ROWNUM condition instead. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-06-28 15:29:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Tue, 28 Jun 2005 10:28 AM Do you realize that there is a bazillion dollar company that supports the Oracle database? In fact, you are already a customer of this company! Why would you report Oracle bugs in Hibernate JIRA?? This is very strange and bizarre behavior. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-682 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-682 Summary: setFetchSize() causes problems in Oracle JDBC 9.2.0.5 Type: Bug Status: Closed Priority: Major Resolution: REJECTED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Versions: 3.0.5 Assignee: Reporter: Serge P. Nekoval Created: Tue, 28 Jun 2005 9:25 AM Updated: Tue, 28 Jun 2005 10:28 AM Environment: Oracle JDBC driver 9.2.0.5 Description: Code sample below: ScrollableResults results = session .createQuery("from myEntity") .setFetchSize(100000) .scroll(ScrollMode.FORWARD_ONLY); SQL Error: 17068, SQLState: null java.sql.SQLException: Invalid argument in: setFetchSize at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.driver.OracleStatement.setPrefetchInternal(OracleStatement.java:1727) at oracle.jdbc.driver.OracleStatement.setFetchSize(OracleStatement.java:6760) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1190) at org.hibernate.loader.Loader.scroll(Loader.java:1634) at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443) at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291) at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960) at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62) However, the code works fine under Oracle 8i driver. If you look at JDBC 2.0 docs, fetch size must be in range 0 <= fetchSize <= statement.getMaxRows(). My guess is that Oracle 9 driver checks this condition, and it appears that getMaxRows() returns zero. I tried a workaround with setMaxResults() on Hibernate's Query, but it doesn't seem to call statement.setMaxRows(), using ROWNUM condition instead. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-06-29 07:30:55
|
The following comment has been added to this issue: Author: Serge P. Nekoval Created: Wed, 29 Jun 2005 2:29 AM Body: I don't think its an Oracle issue. Oracle driver here is 100% compliant with JDBC 2.0 spec. And JDBC 2.0 say that setFetchSize() _must_ throw SQLException. That means it is actually a Hibernate problem, which is not compliant with JDBC. I have no idea why other drivers work - in fact, they shouldn't. This problem will potentially appear in any JDBC driver that conforms to the spec. --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-682?page=comments#action_18544 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-682 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-682 Summary: setFetchSize() causes problems in Oracle JDBC 9.2.0.5 Type: Bug Status: Closed Priority: Major Resolution: REJECTED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Versions: 3.0.5 Assignee: Reporter: Serge P. Nekoval Created: Tue, 28 Jun 2005 9:25 AM Updated: Wed, 29 Jun 2005 2:29 AM Environment: Oracle JDBC driver 9.2.0.5 Description: Code sample below: ScrollableResults results = session .createQuery("from myEntity") .setFetchSize(100000) .scroll(ScrollMode.FORWARD_ONLY); SQL Error: 17068, SQLState: null java.sql.SQLException: Invalid argument in: setFetchSize at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.driver.OracleStatement.setPrefetchInternal(OracleStatement.java:1727) at oracle.jdbc.driver.OracleStatement.setFetchSize(OracleStatement.java:6760) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1190) at org.hibernate.loader.Loader.scroll(Loader.java:1634) at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443) at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291) at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960) at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62) However, the code works fine under Oracle 8i driver. If you look at JDBC 2.0 docs, fetch size must be in range 0 <= fetchSize <= statement.getMaxRows(). My guess is that Oracle 9 driver checks this condition, and it appears that getMaxRows() returns zero. I tried a workaround with setMaxResults() on Hibernate's Query, but it doesn't seem to call statement.setMaxRows(), using ROWNUM condition instead. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-06-29 07:48:58
|
The following comment has been added to this issue: Author: Max Rydahl Andersen Created: Wed, 29 Jun 2005 2:48 AM Body: but if getMaxRows() returns 0 it means there is no limit.... --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-682?page=comments#action_18546 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-682 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-682 Summary: setFetchSize() causes problems in Oracle JDBC 9.2.0.5 Type: Bug Status: Closed Priority: Major Resolution: REJECTED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Versions: 3.0.5 Assignee: Reporter: Serge P. Nekoval Created: Tue, 28 Jun 2005 9:25 AM Updated: Wed, 29 Jun 2005 2:48 AM Environment: Oracle JDBC driver 9.2.0.5 Description: Code sample below: ScrollableResults results = session .createQuery("from myEntity") .setFetchSize(100000) .scroll(ScrollMode.FORWARD_ONLY); SQL Error: 17068, SQLState: null java.sql.SQLException: Invalid argument in: setFetchSize at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.driver.OracleStatement.setPrefetchInternal(OracleStatement.java:1727) at oracle.jdbc.driver.OracleStatement.setFetchSize(OracleStatement.java:6760) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1190) at org.hibernate.loader.Loader.scroll(Loader.java:1634) at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443) at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291) at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960) at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62) However, the code works fine under Oracle 8i driver. If you look at JDBC 2.0 docs, fetch size must be in range 0 <= fetchSize <= statement.getMaxRows(). My guess is that Oracle 9 driver checks this condition, and it appears that getMaxRows() returns zero. I tried a workaround with setMaxResults() on Hibernate's Query, but it doesn't seem to call statement.setMaxRows(), using ROWNUM condition instead. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-06-29 08:47:59
|
The following comment has been added to this issue: Author: Serge P. Nekoval Created: Wed, 29 Jun 2005 3:46 AM Body: Oops, found by decompiling Oracle driver: /*1726*/ if(i < 0 || i > 32767) /*1727*/ DBError.throwSqlException(68, "setFetchSize"); Goddamn Oracle. --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-682?page=comments#action_18550 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-682 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-682 Summary: setFetchSize() causes problems in Oracle JDBC 9.2.0.5 Type: Bug Status: Closed Priority: Major Resolution: REJECTED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Versions: 3.0.5 Assignee: Reporter: Serge P. Nekoval Created: Tue, 28 Jun 2005 9:25 AM Updated: Wed, 29 Jun 2005 3:46 AM Environment: Oracle JDBC driver 9.2.0.5 Description: Code sample below: ScrollableResults results = session .createQuery("from myEntity") .setFetchSize(100000) .scroll(ScrollMode.FORWARD_ONLY); SQL Error: 17068, SQLState: null java.sql.SQLException: Invalid argument in: setFetchSize at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.driver.OracleStatement.setPrefetchInternal(OracleStatement.java:1727) at oracle.jdbc.driver.OracleStatement.setFetchSize(OracleStatement.java:6760) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1190) at org.hibernate.loader.Loader.scroll(Loader.java:1634) at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443) at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291) at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960) at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62) However, the code works fine under Oracle 8i driver. If you look at JDBC 2.0 docs, fetch size must be in range 0 <= fetchSize <= statement.getMaxRows(). My guess is that Oracle 9 driver checks this condition, and it appears that getMaxRows() returns zero. I tried a workaround with setMaxResults() on Hibernate's Query, but it doesn't seem to call statement.setMaxRows(), using ROWNUM condition instead. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |