Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 86309 invoked from network); 24 Sep 2007 16:08:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Sep 2007 16:08:21 -0000 Received: (qmail 48319 invoked by uid 500); 24 Sep 2007 16:08:11 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 48098 invoked by uid 500); 24 Sep 2007 16:08:11 -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 48089 invoked by uid 99); 24 Sep 2007 16:08:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2007 09:08:11 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2007 16:08:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A31A5714221 for ; Mon, 24 Sep 2007 09:07:51 -0700 (PDT) Message-ID: <33251302.1190650071660.JavaMail.jira@brutus> Date: Mon, 24 Sep 2007 09:07:51 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3085) Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes In-Reply-To: <2415144.1190490410769.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kathey Marsden updated DERBY-3085: ---------------------------------- Derby Info: [Regression] Looks like this regressed with revision 438478 of DERBY-1559 http://svn.apache.org/viewvc?view=rev&revision=438478 > Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes > --------------------------------------------------------------------------- > > Key: DERBY-3085 > URL: https://issues.apache.org/jira/browse/DERBY-3085 > Project: Derby > Issue Type: Bug > Components: JDBC, Network Client > Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4 > Environment: Windows XP SP2 > Reporter: Mikael Aronsson > > Java Version: 1.6.0_02 > Java Vendor: Sun Microsystems Inc. > Java home: C:\Program Files\Java\jre1.6.0_02 > Java classpath: derbytools.jar > OS name: Windows XP > OS architecture: x86 > OS version: 5.1 > Java user name: Ma > Java user home: C:\Documents and Settings\ma > Java user dir: c:\tools\derby\lib > java.specification.name: Java Platform API Specification > java.specification.version: 1.6 > --------- Derby Information -------- > JRE - JDBC: Java SE 6 - JDBC 4.0 > [C:\tools\derby\lib\derbytools.jar] 10.3.1.4 - (561794) > The following code fails: > // Data is a byte[] vector > ByteArrayInputStream is = new ByteArrayInputStream( data); > String sql = "UPDATE MyTable SET FContents=? WHERE FName='" + name + "'"; > PreparedStatement ps = conn.prepareStatement( sql); > ps.setBinaryStream( 1, is, data.length); > > if( ps.executeUpdate() == 0) > { > // it throws an exception here if the data array us larger then around 32750 bytes!!! > } > It look's like when the size of the data[] vector is > 32750 bytes or so it throws an exception like this: > java.sql.SQLException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected. Reason: 0x0. Plaintext connection attempt to an SSL enabled server? > 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.PreparedStatement.executeUpdate(Unknown Source) > The table is defined as: > CREATE TABLE MyTable (FName varchar(300) NOT NULL,FContents BLOB(16M) NOT NULL) > It does loook like this only happens with the NetWork client driver, the embedded driver works fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.