Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 81143 invoked from network); 15 Nov 2005 16:48:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Nov 2005 16:48:27 -0000 Received: (qmail 77205 invoked by uid 500); 15 Nov 2005 16:48:26 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 77177 invoked by uid 500); 15 Nov 2005 16:48:26 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 77168 invoked by uid 99); 15 Nov 2005 16:48:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 08:48:26 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of dremesh@gmail.com designates 66.249.82.202 as permitted sender) Received: from [66.249.82.202] (HELO xproxy.gmail.com) (66.249.82.202) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 08:48:17 -0800 Received: by xproxy.gmail.com with SMTP id t12so1490761wxc for ; Tue, 15 Nov 2005 08:48:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=eAfL39s8I6/v0sZK/M834vfx3zNrmoPJr/j2cHc/vpZjnlRBTUme/j+YWtP/tDWDBfLHywEew6oYDicLXGZfSbn+YmQ3yu8iwktqX8Log8sKoFBdbi8c8UaBsVe1QNVrRXWDOdouQxDycCqoqA+6mWo4Q59Z/uOmnyiMRgiSVbs= Received: by 10.70.52.8 with SMTP id z8mr2856561wxz; Tue, 15 Nov 2005 08:48:05 -0800 (PST) Received: by 10.70.131.2 with HTTP; Tue, 15 Nov 2005 08:48:05 -0800 (PST) Message-ID: <58ed70f50511150848v2e01f9f3o96bbb9643666a09a@mail.gmail.com> Date: Tue, 15 Nov 2005 08:48:05 -0800 From: Deepa Remesh To: derby-dev@db.apache.org Subject: [PATCH] for test jdbcapi/characterStreams.java MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_23002_26657660.1132073285066" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_23002_26657660.1132073285066 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I am attaching a patch for the test jdbcapi/characterStreams.java, which fails in J2ME with the following error: ERROR X0X95: Operation 'DROP INDEX' cannot be performed on object 'SQL051115082553360' because there is an open ResultSet dependent on that object. =09at org.apache.derby.iapi.error.StandardException.newException(StandardEx= ception.java:322) =09at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.verif= yNoOpenResultSets(GenericLanguageConnectionContext.java:1696) =09at org.apache.derby.impl.sql.GenericPreparedStatement.prepareToInvalidat= e(GenericPreparedStatement.java:712) =09at org.apache.derby.impl.sql.depend.BasicDependencyManager.coreInvalidat= eFor(BasicDependencyManager.java:379) =09at org.apache.derby.impl.sql.depend.BasicDependencyManager.invalidateFor= (BasicDependencyManager.java:224) =09at org.apache.derby.impl.sql.execute.DropIndexConstantAction.dropIndex(D= ropIndexConstantAction.java:214) =09at org.apache.derby.impl.sql.execute.DropConstraintConstantAction.dropCo= nstraintAndIndex(DropConstraintConstantAction.java:316) =09at org.apache.derby.impl.sql.execute.DropTableConstantAction.dropAllCons= traintDescriptors(DropTableConstantAction.java:346) =09at org.apache.derby.impl.sql.execute.DropTableConstantAction.executeCons= tantAction(DropTableConstantAction.java:219) =09at org.apache.derby.impl.sql.execute.MiscResultSet.open(MiscResultSet.ja= va:56) =09at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPre= paredStatement.java:368) =09at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedState= ment.java:1142) =09at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java= :550) =09at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(EmbedStatemen= t.java:158) =09at org.apache.derbyTesting.functionTests.tests.jdbcapi.characterStreams.= main(characterStreams.java:68) The patch adds a line to close the result set before exiting 'setStreams' method. With the patch, I ran this test successfully with Sun JDK 1.4.2 (all 3 frameworks) and j9_foundation in IBM WCTME 5.7. I was trying to see why this test was working in J2SE without the rs.close(). I am thinking this is because the result set object gets garbage collected and automatically closed when the method 'setStreams' exits. But in J2ME, garbage collection does not occur immediately, hence a result set object remains open and drop operation fails. It would be great if someone can take a look and commit this patch. Thanks, Deepa ------=_Part_23002_26657660.1132073285066 Content-Type: text/x-patch; name=characterStreams.diff; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="characterStreams.diff" Index: java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/characterStreams.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/characterStreams.java (revision 344298) +++ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/characterStreams.java (working copy) @@ -222,6 +222,8 @@ checkCharacterStreams(psDel, psi, psq2, 25, 19332, 18733,colType); checkCharacterStreams(psDel, psi, psq2, 1, 32433, 32673,colType); checkCharacterStreams(psDel, psi, psq2, 0, 32532, 32700,colType); + + rs.close(); } private static int getMaxId(Connection conn) throws SQLException { ------=_Part_23002_26657660.1132073285066--