cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Conversion error:
Date Thu, 28 Jul 2016 10:53:42 GMT
A timestamp value should not be read via 'org.apache.cayenne.access.types.ByteArrayType'. Is
it actually a timestamp on the Java end?

Andrus

> On Jul 12, 2016, at 1:56 AM, Tony Giaccone <tgiaccone@gmail.com> wrote:
> 
> I'm using the H2 database and have a field that's a timestamp,
> 
> 
> I get this message on trying to read the field with Cayenne:
> 
> 
> org.h2.jdbc.JdbcSQLException: Hexadecimal string with odd number of
> characters: "2016-07-11 18:21:16.0" [90003-192]
> 
> stack trace looks like:
> 
>    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
>    at org.h2.message.DbException.get(DbException.java:179)
>    at org.h2.message.DbException.get(DbException.java:155)
>    at org.h2.util.StringUtils.convertHexToBytes(StringUtils.java:970)
>    at org.h2.value.Value.convertTo(Value.java:973)
>    at org.h2.value.Value.getBytes(Value.java:422)
>    at org.h2.jdbc.JdbcResultSet.getBytes(JdbcResultSet.java:1059)
>    at
> org.apache.cayenne.access.types.ByteArrayType.materializeObject(ByteArrayType.java:86)
> 
> And it’s true the string is odd in length.
> 
> 
> Seems odd…any thoughts?
> 
> 
> 
> Tony Giaccone


Mime
View raw message