db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Voxland" <Nathan.Voxl...@sundog.net>
Subject RE: Problem with default date values
Date Thu, 09 Aug 2007 15:50:53 GMT
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  

Database Class Loader started - derby.database.classpath=''

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] 
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



Mime
View raw message