Nathan Voxland wrote:
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.modifyColumnDefault(Unknown Source)
Thanks Nathan! This indeed looks identical to the stack trace from https://issues.apache.org/jira/browse/DERBY-2371 so I believe that's the problem you're hitting. Apparently, the description of that issue is inaccurate and it's possible to encounter this problem with empty tables in the case of DATE fields. It would be great if you could add a comment to the DERBY-2371 JIRA issue recording this finding, to help future users. Meanwhile, you can get past this by building a copy of the 10.2 branch yourself, as that branch has the fix for DERBY-2371 in it. thanks, bryan
