Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B47CA7902 for ; Sun, 2 Oct 2011 20:55:56 +0000 (UTC) Received: (qmail 62808 invoked by uid 500); 2 Oct 2011 20:55:56 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 62734 invoked by uid 500); 2 Oct 2011 20:55:55 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 62724 invoked by uid 99); 2 Oct 2011 20:55:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Oct 2011 20:55:55 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Oct 2011 20:55:54 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DE3FA2A5222 for ; Sun, 2 Oct 2011 20:55:33 +0000 (UTC) Date: Sun, 2 Oct 2011 20:55:33 +0000 (UTC) From: "Jukka Zitting (Created) (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <2116816653.1552.1317588933912.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (JCR-3090) setFetchSize() fails in getAllNodeIds() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 setFetchSize() fails in getAllNodeIds() --------------------------------------- Key: JCR-3090 URL: https://issues.apache.org/jira/browse/JCR-3090 Project: Jackrabbit Content Repository Issue Type: Bug Reporter: Jukka Zitting Priority: Minor I get the following exception from the PersistenceManagerIteratorTest on Windows: org.apache.jackrabbit.core.state.ItemStateException: getAllNodeIds failed. at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.getAllNodeIds(BundleDbPersistenceManager.java:1043) at org.apache.jackrabbit.core.data.PersistenceManagerIteratorTest.testGetAllNodeIds(PersistenceManagerIteratorTest.java:106) Caused by: java.sql.SQLException: Invalid parameter value '10'000' for Statement.setFetchSize(int rows). at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.setFetchSize(Unknown Source) at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingStatement.java:279) at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingStatement.java:279) at org.apache.jackrabbit.core.util.db.ConnectionHelper.reallyExec(ConnectionHelper.java:372) at org.apache.jackrabbit.core.util.db.ConnectionHelper$3.call(ConnectionHelper.java:353) at org.apache.jackrabbit.core.util.db.ConnectionHelper$3.call(ConnectionHelper.java:349) at org.apache.jackrabbit.core.util.db.ConnectionHelper$RetryManager.doTry(ConnectionHelper.java:472) at org.apache.jackrabbit.core.util.db.ConnectionHelper.exec(ConnectionHelper.java:349) at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.getAllNodeIds(BundleDbPersistenceManager.java:1020) It's caused by the following code in ConnectionHelper when 0 < maxRows < 10000: stmt.setMaxRows(maxRows); stmt.setFetchSize(10000); A simple fix would be: stmt.setMaxRows(maxRows); stmt.setFetchSize(Math.min(10000, maxRows)); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira