From derby-user-return-7364-apmail-db-derby-user-archive=db.apache.org@db.apache.org Thu Aug 09 15:51:35 2007 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 70555 invoked from network); 9 Aug 2007 15:51:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Aug 2007 15:51:34 -0000 Received: (qmail 87397 invoked by uid 500); 9 Aug 2007 15:51:20 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 87377 invoked by uid 500); 9 Aug 2007 15:51:20 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 87354 invoked by uid 99); 9 Aug 2007 15:51:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 08:51:20 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Nathan.Voxland@sundog.net designates 65.164.223.134 as permitted sender) Received: from [65.164.223.134] (HELO mail.sundog.net) (65.164.223.134) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 15:51:15 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Problem with default date values Date: Thu, 9 Aug 2007 10:50:53 -0500 Message-ID: <1B92B5A688796F4C8296B03BD3AAE27FAF14DC@MAIL.sundog.net> In-Reply-To: <46BB2FDA.7060701@amberpoint.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem with default date values Thread-Index: AcfamF5E4/oYlCRbQV6zaT4YK0MisAAAsTjQ References: <1B92B5A688796F4C8296B03BD3AAE27FAF14AE@MAIL.sundog.net> <46BA3950.3070005@amberpoint.com> <1B92B5A688796F4C8296B03BD3AAE27FAF14C3@MAIL.sundog.net> <46BB2FDA.7060701@amberpoint.com> From: "Nathan Voxland" To: "Derby Discussion" X-Virus-Checked: Checked by ClamAV on apache.org The stacktrace I am getting in my app is: ERROR 22005: An attempt was made to get a data value of type 'long' from a data value of type 'DATE'. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.iapi.types.DataType.dataTypeConversion(Unknown Source) at org.apache.derby.iapi.types.DataType.getLong(Unknown Source) at org.apache.derby.impl.sql.execute.AlterTableConstantAction.getColumnMax( Unknown Source) at org.apache.derby.impl.sql.execute.AlterTableConstantAction.modifyColumnD efault(Unknown Source) at org.apache.derby.impl.sql.execute.AlterTableConstantAction.execGuts(Unkn own Source) at org.apache.derby.impl.sql.execute.AlterTableConstantAction.executeConsta ntAction(Unknown Source) at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at liquibase.migrator.change.AbstractChange.execute(AbstractChange.java:236 ) at liquibase.migrator.change.AbstractChange.executeStatements(AbstractChang e.java:80) at liquibase.migrator.ChangeSet.execute(ChangeSet.java:120) at liquibase.migrator.parser.UpdateDatabaseChangeLogHandler.handleChangeSet (UpdateDatabaseChangeLogHandler.java:47) at liquibase.migrator.parser.BaseChangeLogHandler.endElement(BaseChangeLogH andler.java:231) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement( AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement (XMLSchemaValidator.java:818) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEnd Element(XMLNSDocumentScannerImpl.java:719) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F ragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:16 85) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s canDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1 1Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1 1Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav a:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr actSAXParser.java:1242) at liquibase.migrator.Migrator.runChangeLogs(Migrator.java:559) My derby.log file is pretty empty: ---------------------------------------------------------------- 2007-08-09 15:49:34.589 GMT: Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.2.0 - (485682): instance c013800d-0114-4b51-0451-0000000ec790 on database directory C:\Documents and Settings\nvoxland\IdeaProjects\liquibase\liquibase =20 Database Class Loader started - derby.database.classpath=3D'' 2007-08-09 15:50:14.104 GMT: Shutting down instance c013800d-0114-4b51-0451-0000000ec790 ---------------------------------------------------------------- Nathan -----Original Message----- From: Bryan Pendleton [mailto:bpendleton@amberpoint.com]=20 Sent: Thursday, August 09, 2007 10:17 AM To: Derby Discussion Subject: Re: Problem with default date values > Does setting the default value for the other columns kick in that bug? No, I didn't think so. DERBY-2371 specifically involved a problem when there were a non-zero number of non-null values in the table at the time of the ALTER TABLE command. Also, I tried your complete set of commands against the current trunk and did not see the error. Can you post the full stack trace (from derby.log) of the problem you're seeing? > I'll try the latest code to see if that helps. Are there nightly builds > available, or do I have to build it myself? For Derby 10.3, there is a release candidate available, and the complete release should be available very soon. Get the candidate here: http://wiki.apache.org/db-derby/DerbyTenThreeRelease You have to build the trunk yourself, but it's not hard. Full instructions are available at the web site. If you encounter problems, people on the derby-dev list will be glad to help you. Start here: http://db.apache.org/derby/dev/derby_source.html thanks, bryan