Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 68060 invoked from network); 17 Jul 2009 10:37:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jul 2009 10:37:43 -0000 Received: (qmail 79436 invoked by uid 500); 17 Jul 2009 10:38:48 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 79381 invoked by uid 500); 17 Jul 2009 10:38:48 -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 79373 invoked by uid 99); 17 Jul 2009 10:38:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2009 10:38:48 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.18.6.21] (HELO gmp-eb-inf-1.sun.com) (192.18.6.21) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2009 10:38:36 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-1-fe3.eu.sun.com [192.18.6.10]) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n6HAcFKY010797 for ; Fri, 17 Jul 2009 10:38:15 GMT MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009)) id <0KMX00J009GTQ900@fe-emea-09.sun.com> for derby-dev@db.apache.org; Fri, 17 Jul 2009 11:38:15 +0100 (BST) Received: from [129.159.139.223] ([unknown] [129.159.139.223]) by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009)) with ESMTPSA id <0KMX003V29JO4NB0@fe-emea-09.sun.com> for derby-dev@db.apache.org; Fri, 17 Jul 2009 11:38:12 +0100 (BST) Date: Fri, 17 Jul 2009 12:36:31 +0200 From: Kristian Waagan Subject: Re: Question about maildjbc test In-reply-to: <4A600C1A.4050801@sbcglobal.net> Sender: Kristian.Waagan@Sun.COM To: derby-dev@db.apache.org Message-id: <4A60542F.8030700@Sun.COM> References: <4A600C1A.4050801@sbcglobal.net> User-Agent: Thunderbird 2.0.0.21 (X11/20090505) X-Virus-Checked: Checked by ClamAV on apache.org Kathey Marsden wrote: > > I am running the 10.5 maildbc test on Linux with network server and > the release candidate and an updated derbyTesting.jar to have just > Lily's change to change the backup user: I see in the test output > early and often, this error inserting data into the table: > > > SQLState: XJ215 > Severity: 20000 > Message: You cannot invoke other java.sql.Clob/java.sql.Blob methods > after calling the free() method or afte > Clob's transaction has been committed or rolled back. > java.sql.SQLException: You cannot invoke other > java.sql.Clob/java.sql.Blob methods after calling the free() m > ter the Blob/Clob's transaction has been committed or rolled back. > at > org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown > Source) > at > org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) > at org.apache.derby.client.am.Lob.checkValidity(Unknown Source) > at org.apache.derby.client.am.Clob.length(Unknown Source) > at > org.apache.derby.client.net.NetStatementRequest.computeProtocolTypesAndLengths(Unknown > Source) > at > org.apache.derby.client.net.NetStatementRequest.buildSQLDTAcommandData(Unknown > Source) > at > org.apache.derby.client.net.NetStatementRequest.writeExecute(Unknown > Source) > at > org.apache.derby.client.net.NetPreparedStatement.writeExecute_(Unknown > Source) > at > org.apache.derby.client.am.PreparedStatement.writeExecute(Unknown Source) > at > org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source) > at > org.apache.derby.client.am.PreparedStatement.executeUpdateX(Unknown > Source) > at > org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown > Source) > at > org.apache.derbyTesting.system.mailjdbc.utils.DbTasks.insertMail(DbTasks.java:447) > > at > org.apache.derbyTesting.system.mailjdbc.tasks.Refresh.insertMail(Refresh.java:99) > > at > org.apache.derbyTesting.system.mailjdbc.tasks.Refresh.doWork(Refresh.java:75) > > at > org.apache.derbyTesting.system.mailjdbc.tasks.Refresh.run(Refresh.java:51) > > Caused by: org.apache.derby.client.am.SqlException: You cannot invoke > other java.sql.Clob/java.sql.Blob metho > lling the free() method or after the Blob/Clob's transaction has been > committed or rolled back. > > The interesting thing is that the test itself is not using any Clob > methods it uses setCharacterStream and also autocommit is off. > Below is a code excerpt and > conn.setAutoCommit(false); > PreparedStatement insertFirst = conn.prepareStatement( > Statements.insertStr, > Statement.RETURN_GENERATED_KEYS); > String name = new String("ABCD"); > String l_name = new String("WXYZ"); > long s_insert = System.currentTimeMillis(); > for (int i = 0; i < num; i++) { > String new_name = new String(increment(name, 60)); > String new_lname = new String(decrement(l_name, 60)); > insertFirst.setString(1, new_name); > insertFirst.setString(2, new_lname); > insertFirst.setTimestamp(3, new Timestamp(System > .currentTimeMillis())); > name = new_name; > l_name = new_lname; > try { > // to create a stream of random length between 200 > bytes and 3MB > int clobLength = Rn.nextInt(3078000 - 200 + 1) + 200; > streamReader = new LoopingAlphabetReader(clobLength, > CharAlphabet.modernLatinLowercase()); > insertFirst.setCharacterStream(4, streamReader, > clobLength); > } catch (Exception e) { > MailJdbc.logAct.logMsg(LogFile.ERROR + thread_name > + " : " > + "File not found Exception : " + > e.getMessage()); > errorPrint(e); > throw e; > } > int rand_num = Rn.nextInt(10 - 1); > if (i == rand_num) { > ResultSet rs = stmt > .executeQuery("select count(*) from > REFRESH.INBOX where attach_id>0"); > while (rs.next()) { > id_count = rs.getInt(1); > insertFirst.setInt(5, rs.getInt(1) + 1); > } > > rs.close(); > > conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); > } else > insertFirst.setInt(5, 0); > insertFirst > .setString( > 6, > "This column is used only to by pass > the space problem. If the problem still exists, then we are going to " > + "have a serious issue > here.*****************************************************************************************************"); > > int result = insertFirst.executeUpdate(); > > > if I connect with ij I do see some rows in the INBOX, so some inserts > do seem to be happening. Does this look familiar to anyone? Hi Kathey, This error looks similar to DERBY-4224 [1], although in this case auto-commit is off. -- Kristian [1] https://issues.apache.org/jira/browse/DERBY-4224 > > > Thanks > > Kathey >