Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 89598 invoked from network); 14 Sep 2010 12:09:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Sep 2010 12:09:02 -0000 Received: (qmail 46017 invoked by uid 500); 14 Sep 2010 12:09:02 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 45718 invoked by uid 500); 14 Sep 2010 12:08:59 -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 45710 invoked by uid 99); 14 Sep 2010 12:08:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Sep 2010 12:08:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Sep 2010 12:08:57 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8EC8aRa015419 for ; Tue, 14 Sep 2010 12:08:36 GMT Message-ID: <18751510.175851284466116543.JavaMail.jira@thor> Date: Tue, 14 Sep 2010 08:08:36 -0400 (EDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4799) IllegalArgumentException when generating error message on server In-Reply-To: <6425782.172381284449493064.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-4799?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1290= 9210#action_12909210 ]=20 Knut Anders Hatlen commented on DERBY-4799: ------------------------------------------- OK, I'll wait for those changes. Thanks. > IllegalArgumentException when generating error message on server > ---------------------------------------------------------------- > > Key: DERBY-4799 > URL: https://issues.apache.org/jira/browse/DERBY-4799 > Project: Derby > Issue Type: Bug > Components: Network Server > Affects Versions: 10.6.1.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Attachments: fix.diff, test.diff > > > If you for example try to connect to a non-existing database using the cl= ient driver, and the name of the database has 18 characters or more, and at= least one of the characters in the database name is a non-ascii character,= the server will throw an IllegalArgumentException when trying to send the = "database not found" message back to the client. > Example: > ij> connect 'jdbc:derby://localhost/abcdefghijklmnopq=C3=A5'; > ERROR 08006: A network protocol error was encountered and the connection = has been terminated: A PROTOCOL Data Stream Syntax Error was detected. Rea= son: 0x12. Plaintext connection attempt to an SSL enabled server? > Printed to the console by the server: > Tue Sep 14 09:12:05 CEST 2010 : fromIndex(60) > toIndex(59) > java.lang.IllegalArgumentException: fromIndex(60) > toIndex(59) > =09at java.util.Arrays.rangeCheck(Arrays.java:1306) > =09at java.util.Arrays.fill(Arrays.java:2567) > =09at org.apache.derby.impl.drda.DDMWriter.padBytes(DDMWriter.java:1254) > =09at org.apache.derby.impl.drda.DDMWriter.writeScalarPaddedBytes(DDMWrit= er.java:992) > =09at org.apache.derby.impl.drda.DRDAConnThread.writeRDBNAM(DRDAConnThrea= d.java:583) > =09at org.apache.derby.impl.drda.DRDAConnThread.writeRDBfailure(DRDAConnT= hread.java:1248) > =09at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(DRDAC= onnThread.java:1194) > =09at org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnT= hread.java:968) > =09at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:2= 94) --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.