[
https://issues.apache.org/jira/browse/TORQUE-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18092014#comment-18092014
]
Graham Leggett commented on TORQUE-375:
---------------------------------------
I updated the error message in one of the failing tests to be more explicit,
and I got this below.
Looks like derby v1.16 doesn't properly support the java.time API. When you ask
it to return a TIME as a java.time.LocalTime it says it can't do that.
Or it could be embedding an old version of the derby database that doesn't
support java.time.
{code}
[ERROR]
org.apache.torque.generated.peer.DefaultValuesFromDatabaseTest.testCurrentTimeAsDefault(Adapter)
-- Time elapsed: 0.011 s <<< ERROR!
org.apache.torque.TorqueException: While trying to run
java.sql.Resultset.getObject(1, java.time.LocalTime.class) an exception was
thrown by the JDBC driver.
at
org.apache.torque.generated.peer.DefaultValuesFromDatabaseTest.doSelect(DefaultValuesFromDatabaseTest.java:449)
at
org.apache.torque.generated.peer.DefaultValuesFromDatabaseTest.testCurrentTimeAsDefault(DefaultValuesFromDatabaseTest.java:312)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.sql.SQLDataException: An attempt was made to get a data value
of type 'java.time.LocalTime' from a data value of type 'TIME'.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:84)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:141)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:225)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:220)
at
org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java:3208)
at
org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(ConnectionChild.java:153)
at
org.apache.derby.impl.jdbc.EmbedResultSet.mismatchException(EmbedResultSet.java:5721)
at
org.apache.derby.impl.jdbc.EmbedResultSet.getObject(EmbedResultSet.java:5715)
at
org.apache.commons.dbcp2.Jdbc41Bridge.getObject(Jdbc41Bridge.java:169)
at
org.apache.commons.dbcp2.DelegatingResultSet.getObject(DelegatingResultSet.java:742)
at
org.apache.torque.generated.peer.DefaultValuesFromDatabaseTest.doSelect(DefaultValuesFromDatabaseTest.java:446)
... 4 more
Caused by: ERROR 22005: An attempt was made to get a data value of type
'java.time.LocalTime' from a data value of type 'TIME'.
at
org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:299)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java:170)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:75)
... 14 more
{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,
> torque8-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)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]