Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3F130DF7D for ; Tue, 19 Jun 2012 11:28:46 +0000 (UTC) Received: (qmail 50588 invoked by uid 500); 19 Jun 2012 11:28:46 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 50340 invoked by uid 500); 19 Jun 2012 11:28:43 -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 50224 invoked by uid 99); 19 Jun 2012 11:28:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 11:28:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 27760142864 for ; Tue, 19 Jun 2012 11:28:43 +0000 (UTC) Date: Tue, 19 Jun 2012 11:28:43 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: <1847476805.29239.1340105323165.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1943832977.8547.1338211944507.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (DERBY-5788) BIT support regression and confusing message in 10.8.2.2: org.apache.derby.client.am.SqlException: Invalid character string format for type BOOLEAN 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-5788?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1339= 6690#comment-13396690 ]=20 Knut Anders Hatlen commented on DERBY-5788: ------------------------------------------- 9.3.3 BIT in the above mentioned URL, on the other hand, says that the reco= mmended Java mapping is a Java boolean, whose string representation is "tru= e"/"false", so I suppose it could be interpreted either way. :) One thing I notice, is that the code in CTS 6 appears to be more liberal an= d accept both drivers that use "1"/"0" for setObject(...,BIT) and those tha= t use "true"/"false", regardless of their support for BOOLEAN. The version = of the CTS that found DERBY-4964, was an older one (1.4.1 IIRC), which requ= ired databases without support for BOOLEAN to accept "1"/"0", and those tha= t did support BOOLEAN had to accept "true"/"false". It might be that we wou= ldn't have had to make that change if we had used a newer CTS to vet the 10= .8 release. I suppose supporting both types of conversion wouldn't cause much harm, tho= ugh. =20 > BIT support regression and confusing message in 10.8.2.2: org.apache.derb= y.client.am.SqlException: Invalid character string format for type BOOLEAN > -------------------------------------------------------------------------= -------------------------------------------------------------------------- > > Key: DERBY-5788 > URL: https://issues.apache.org/jira/browse/DERBY-5788 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.8.2.2 > Environment: Windows 7 (All) > Reporter: Radoslav Ivanov > > Scenario (on 10.8.2.2; with 10.5.1.1 the problem does not appear): when = setting BIT from this example : > rsSch.createTab("Bit_Tab",sqlp,conn); > String sMaxBooleanVal =3D rsSch.extractVal("Bit_Tab",1,sqlp,conn); //valu= e is =E2=80=9C1=E2=80=9C > cstmt =3D conn.prepareCall("{call Bit_In_Min(?)}"); > cstmt.setObject(1,sMaxBooleanVal,java.sql.Types.BIT); //-> throws the exc= eption below > Exception (Problem with not supporting =E2=80=9C0=E2=80=9D and =E2=80=9C1= =E2=80=9D for the type BIT; moreover, confusing message): > java.sql.SQLDataException: Invalid character string format for type BOOLE= AN. > at org.apache.derby.client.am.SQLExceptionFactory40.getSQLExcept= ion(Unknown Source) > at org.apache.derby.client.am.SqlException.getSQLException(Unkno= wn Source) > at org.apache.derby.client.am.PreparedStatement.setObject(Unknow= n Source) > at org.apache.commons.dbcp.DelegatingPreparedStatement.setObject= (DelegatingPreparedStatement.java:166) > at org.apache.commons.dbcp.DelegatingPreparedStatement.setObject= (DelegatingPreparedStatement.java:166) > at com.sun.ts.tests.jdbc.ee.callStmt.callStmt10.callStmtClient10= .testSetObject48(callStmtClient10.java:812) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces= sorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet= hodAccessorImpl.java:25) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira