[jira] [Commented] (TORQUE-375) Support for java.time API

"Georg Kallidis (Jira)" <[email protected]> Thu, 25 Jun 2026 14:04:00 +0000 (UTC)
Newsgroups gmane.comp.jakarta.turbine.torque.devel
Message-ID <[email protected]>
    [ https://issues.apache.org/jira/browse/TORQUE-375?page=3Dcom.atlassian=
.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1809=
1623#comment-18091623 ]=20

Georg Kallidis commented on TORQUE-375:
---------------------------------------

yes, indeed, I tested with derbyEmbedded-jenkins. The java.sql.SQLDataExcep=
tion exceptions might be due to some internal restrictive tests in the derb=
y JDBC driver (not yet maintained any more).

If I change to hsqldb-jenkins some errors vanish, but some still exist (the=
 profile hsqldb-jenkins is initialized in test-torque/pom.xml with <torque.=
test.currentDateDefault>default=3D"CURRENT_DATE", etc., which explains some=
 of them
{code:java}
[ERROR] Failures:
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testJavaDefault:92 expected: <=
null> but was: <2010-09-08>
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testNotNewObjectSavesUnchanged=
Values:240 expected: <null> but was: <2010-09-08>
[ERROR] Errors:
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testCurrentDateAsDefault:275 =
=E2=94=AC=E2=95=97 DateTimeParse Text 'CURRENT_DATE' could not be parsed at=
 index 0
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testCurrentTimeAsDefault:308 =
=E2=94=AC=E2=95=97 DateTimeParse Text 'CURRENT_TIME' could not be parsed at=
 index 0
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testCurrentTimestampAsDefault:=
345 =E2=94=AC=E2=95=97 DateTimeParse Text 'CURRENT_TIMESTAMP' could not be =
parsed at index 0
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testNewObjectChangedValue:196-=
>doSelect:405->doSelect:442 =E2=94=AC=E2=95=97 SQLSyntaxError incompatible =
data type in conversion
[INFO]
[ERROR] Tests run: 290, Failures: 2, Errors: 4, Skipped: 0{code}
This is exactly line 275 in org.apache.torque.generated.peer.DefaultValuesF=
romDatabaseTest

in testCurrentDateAsDefault:
{code:java}
CurrentDateTable currentDate =3D new CurrentDateTable();{code}

> Support for java.time API
> -------------------------
>
>                 Key: TORQUE-375
>                 URL: https://issues.apache.org/jira/browse/TORQUE-375
>             Project: Torque
>          Issue Type: Improvement
>    Affects Versions: 7.1
>            Reporter: Graham Leggett
>            Priority: Major
>         Attachments: torque8-javatime1.patch, torque8-javatime2.patch, to=
rque8-javatime3.patch, torque8-javatime4.patch
>
>
> Switch out java.util.Date, replace with the java.time API.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)