Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 79297 invoked from network); 18 Apr 2005 09:42:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Apr 2005 09:42:10 -0000 Received: (qmail 97179 invoked by uid 500); 18 Apr 2005 09:42:08 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 97108 invoked by uid 500); 18 Apr 2005 09:42:07 -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: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 97094 invoked by uid 99); 18 Apr 2005 09:42:07 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from brmea-mail-4.Sun.COM (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 18 Apr 2005 02:42:06 -0700 Received: from phys-biff-2 ([129.158.227.37]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id j3I9fviF017830 for ; Mon, 18 Apr 2005 03:42:04 -0600 (MDT) Received: from conversion-daemon.biff-mail1.india.sun.com by biff-mail1.india.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IF400J01YMOBR@biff-mail1.india.sun.com> (original mail from Shreyas.Kaushik@Sun.COM) for derby-dev@db.apache.org; Mon, 18 Apr 2005 15:12:00 +0530 (IST) Received: from [192.168.1.100] (vpn-129-150-156-12.India.Sun.COM [129.150.156.12]) by biff-mail1.india.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0IF400AXFYXZVZ@biff-mail1.india.sun.com> for derby-dev@db.apache.org; Mon, 18 Apr 2005 15:12:00 +0530 (IST) Date: Mon, 18 Apr 2005 15:12:33 +0530 From: Shreyas Kaushik Subject: Re: [jira] Commented: (DERBY-203) setNull(x,JDBCType.DATE) does not work when batching is turned on In-reply-to: <1526739591.1113807958484.JavaMail.jira@ajax.apache.org> To: Derby Development Message-id: <42638109.80707@sun.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) References: <1526739591.1113807958484.JavaMail.jira@ajax.apache.org> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I was not able to reproduce it. The case you are mentioning here just worked fine for me. A repro here would help, I can check if I missed something that your program does. ~ Shreyas Shreyas Kaushik (JIRA) wrote: > [ http://issues.apache.org/jira/browse/DERBY-203?page=comments#action_63028 ] > >Shreyas Kaushik commented on DERBY-203: >--------------------------------------- > >I had fixed smilar problem with Blob and Timestamp. I will look into this and other types with which this problem can arise. > > > >>setNull(x,JDBCType.DATE) does not work when batching is turned on >>----------------------------------------------------------------- >> >> Key: DERBY-203 >> URL: http://issues.apache.org/jira/browse/DERBY-203 >> Project: Derby >> Type: Bug >> Components: JDBC >> Versions: 10.0.2.1 >> Environment: ------------------ Java Information ------------------ >>Java Version: 1.4.2_07 >>Java Vendor: Sun Microsystems Inc. >>Java home: /usr/local/java/j2sdk1.4.2_07/jre >>Java classpath: /home/oleg/prg/cs/lib/derby.jar:/home/oleg/prg/cs/lib/derbytools.jar: >>OS name: Linux >>OS architecture: i386 >>OS version: 2.6.8.1-24mdk >>Java user name: oleg >>Java user home: /home/oleg >>Java user dir: /usr/local/home/oleg/prg/cs/frameworks/embedded/bin >>--------- Derby Information -------- >>[/usr/local/home/oleg/prg/cs/lib/derby.jar] 10.0.2.0 - (30301) >>[/usr/local/home/oleg/prg/cs/lib/derbytools.jar] 10.0.2.0 - (30301) >>------------------------------------------------------ >>----------------- Locale Information ----------------- >>------------------------------------------------------ >> Reporter: Oleg Anastasyev >> >> > > > >>Trying to execute batch on which setNull(x,DATE) was called gives the following exception: >>SQL Exception: An attempt was made to get a data value of type 'DATE' from a data value of type 'null'. >> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java) >> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java) >> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java) >> at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java) >> at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(ConnectionChild.java) >> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.dataTypeConversion(EmbedPreparedStatement.java) >> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(EmbedPreparedStatement.java) >> at org.apache.derby.iapi.types.DataType.setInto(DataType.java) >> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeBatchElement(EmbedPreparedStatement.java) >> at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(EmbedStatement.java) >> at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54) >>DATE column is nullable in db schema, so it should pass there ok. I believe the problem is in org.apache.derby.iapi.types.SQLDate, which does not implement setInto method, so DataType.setInto method is executed, calling setObject(x,null). setObject thinks this is JDBC spec violation and fails on exception. >>Problem exists in both 10.0.2.1 and 10.0.2.0 >> >> > > >