Oh boy,

taking a look at jooqs source code showed me the true problem:
http://www.jooq.org/doc/3.0/manual/code-generation/custom-data-types/ 
describes how to use the "calendar converter" - well I did so. If you take 
a look at the first stacktrace

>     at org.jooq.tools.Convert$ConvertAll.toDate(Convert.java:781) 
>> ~[jooq-3.0.0-RC2.jar:na]
>>     at org.jooq.tools.Convert$ConvertAll.from(Convert.java:677) 
>> ~[jooq-3.0.0-RC2.jar:na]
>>     at org.jooq.tools.Convert.convert0(Convert.java:291) 
>> ~[jooq-3.0.0-RC2.jar:na]
>>     at org.jooq.tools.Convert.convert(Convert.java:283) 
>> ~[jooq-3.0.0-RC2.jar:na]
>>     at org.jooq.tools.Convert.convert(Convert.java:344) 
>> ~[jooq-3.0.0-RC2.jar:na]
>
>
It follows each step down to ConvertAll.from:677 -> toDate is called, 
though I don't know why this check returns true: (fromClass = Long.class)

java.util.Date.class.isAssignableFrom(fromClass)
>

Whatever - continuing the stacktrace:
You take a look at it and think: mh - seems alright, I got my Date, Time, 
Timestamp, Date and Calendar conversion here. True - but even if this 
method is the right one to use - it fails.
Why: My toClass is "GregorianCalendar.class" - the condition checks for 
"Calendar.class" only.

toClass == Calendar.class
>

Sure - all conditions in this method will fail for GregorianCalendar.class 
and the exception is thrown.
For my needs I quickfixed the generated jooq code to use the "Calendar" and 
not GregorianCalendar.

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to