Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 94240 invoked from network); 14 May 2007 10:52:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 May 2007 10:52:41 -0000 Received: (qmail 93157 invoked by uid 500); 14 May 2007 10:52:45 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 92859 invoked by uid 500); 14 May 2007 10:52:44 -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 92837 invoked by uid 99); 14 May 2007 10:52:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 May 2007 03:52:44 -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, 14 May 2007 03:52:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B19CD71406A for ; Mon, 14 May 2007 03:52:16 -0700 (PDT) Message-ID: <201576.1179139936723.JavaMail.jira@brutus> Date: Mon, 14 May 2007 03:52:16 -0700 (PDT) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2618) EmbedClob.setAsciiStream does not handle non-ascii characters correctly In-Reply-To: <25608569.1178543295661.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-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495548 ] Kristian Waagan commented on DERBY-2618: ---------------------------------------- Forgot to say that I also believe a subset of the issues mentioned above is also valid for the other write-methods. It should also be noted that there is a stack of streams, and I do now know at which level the real bug is present. > EmbedClob.setAsciiStream does not handle non-ascii characters correctly > ----------------------------------------------------------------------- > > Key: DERBY-2618 > URL: https://issues.apache.org/jira/browse/DERBY-2618 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.3.0.0 > Reporter: Kristian Waagan > Assigned To: Kristian Waagan > Attachments: Derby2618BugsInClobAsciiStream.java > > > If non-ascii characters are written to the Writer returned by EmbedClob.setAsciiStream, Derby fails with a 'java.io.UTFDataFormatException' when the CLOB value is read back. > I'm filing this bug with 'Major' priority, as the bug does not manifest itself when entering data, just when you try to get it back. Except from filtering the data yourself before entering it, I don't think there is any workaround. > Sample stack trace from a modified test: > 1) testClobAsciiWrite1ParamKRISTIWAA(org.apache.derbyTesting.functionTests.tests.jdbcapi.LobStreamsTest)java.sql.SQLException: Unable to set stream: 'java.io.UTFDataFormatException'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:94) > at org.apache.derby.impl.jdbc.Util.setStreamFailure(Util.java:246) > at org.apache.derby.impl.jdbc.EmbedClob.length(EmbedClob.java:190) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setClob(EmbedPreparedStatement.java:1441) > at org.apache.derbyTesting.functionTests.tests.jdbcapi.LobStreamsTest.testClobAsciiWrite1ParamKRISTIWAA(LobStreamsTest.java:255) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:88) > Caused by: java.sql.SQLException: Unable to set stream: 'java.io.UTFDataFormatException'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:135) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70) > ... 22 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.