Hmm, one more thought about your exception. I've overlooked a detail: java.time.format.DateTimeParseException: Text '2014-04-01T10:11:10.15 > +0:00' could not be parsed at index 22 > at java.time.format.DateTimeFormatter.parseResolved0( > DateTimeFormatter.java:1949) > at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851) > at java.time.OffsetDateTime.parse(OffsetDateTime.java:402) > at java.time.OffsetDateTime.parse(OffsetDateTime.java:387) > at org.jooq.impl.DefaultBinding.offsetDateTime(DefaultBinding.java:1496) > at org.jooq.impl.DefaultBinding.get(DefaultBinding.java:1336) > at org.jooq.impl.CursorImpl$CursorIterator$CursorRecordInitialiser. > setValue(CursorImpl.java:1640)
The issue here seems to be related to the fact that the offset is of the form +0:00 rather than +00:00. It's a shame that JSR 310 parsing is so strict, but we can certainly work around this issue in jOOQ. I have registered #4965 for this: https://github.com/jOOQ/jOOQ/issues/4965 Thanks again for reporting all of these things. I wish jOOQ could already offer more out-of-the-box help here with these data types. It shouldn't be so hard to integrate them as it is, right now. Best, Lukas 2016-01-21 16:17 GMT+01:00 Lukas Eder <lukas.e...@gmail.com>: > Hi Ben, > > Thanks for your E-Mails and for the workaround. Yes, once you can access > your ojdbc Connection, there's always a way to directly interact with the > JDBC API. > > Ideally, though, you would be writing a data type Binding ( > http://www.jooq.org/doc/latest/manual/sql-building/queryparts/custom-bindings/), > and associate that with your CDR_IDENTIFIERS.EFFECTIVE column. You could > then move the rs.getObject(index, TIMESTAMPTZ.class) call into the binding, > and it would work for all references of the EFFECTIVE column. > > have you tried that? > > Best Regards, > Lukas > > 2016-01-14 11:11 GMT+01:00 Ben Hood <0x6e6...@gmail.com>: > >> On Wed, Jan 13, 2016 at 12:33 AM, Ben Hood <0x6e6...@gmail.com> wrote: >> > java.time.format.DateTimeParseException: Text '2014-04-01T10:11:10.15 >> > +0:00' could not be parsed at index 22 >> > at >> java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949) >> > at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851) >> > at java.time.OffsetDateTime.parse(OffsetDateTime.java:402) >> > at java.time.OffsetDateTime.parse(OffsetDateTime.java:387) >> > at org.jooq.impl.DefaultBinding.offsetDateTime(DefaultBinding.java:1496) >> > at org.jooq.impl.DefaultBinding.get(DefaultBinding.java:1336) >> > at >> org.jooq.impl.CursorImpl$CursorIterator$CursorRecordInitialiser.setValue(CursorImpl.java:1640) >> >> I ended up solving this issue by getting JOOQ to build the SQL and >> JDBC to execute and deserialize the data: >> >> db.executeVoid(ctx -> { >> >> String query = ctx. >> select(CDR_IDENTIFIERS.EFFECTIVE). >> from(CDR_IDENTIFIERS). >> getSQL(); >> >> ctx.connection(c -> { >> PreparedStatement ops = c.prepareStatement(query); >> ResultSet rs = ops.executeQuery(); >> while (rs.next()) { >> TIMESTAMPTZ ts = rs.getObject(1, TIMESTAMPTZ.class); >> OffsetDateTime odt = converter.from(ts); >> // do something with this data >> } >> }); >> >> // do other stuff in the same TX with the JOOQ DSL >> >> }); >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jOOQ User Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jooq-user+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.