Hello.
After a refactoring session, which included moving some classes like
BeatsId in another module, this code
*fun DSLContext.load(beatsId: BeatsId): BeatsPojo
=selectFrom(BEATS).where(BEATS.BEATS_ID.eq(beatsId))
.fetchOneInto(BeatsPojo::class.java)*
causes
*org.jooq.exception.MappingException: An error ocurred when mapping record
to class x.y.z..jooq.tables.pojos.Beats*
*java.lang.ClassCastException: class java.lang.Class cannot be cast to
class java.lang.reflect.ParameterizedType (java.lang.Class and
java.lang.reflect.ParameterizedType are in module java.base of loader
'bootstrap')*
Where BeatsPojo is an alias for the pojo generated by jooq (
*x.y.z..jooq.tables.pojos.Beats)*.
However, this code runs successfully:
*selectFrom(BEATS).where(BEATS.BEATS_ID.eq(beatsId)) .fetchOne().map {
BeatsPojo( it[BEATS.BEATS_ID], it[BEATS.PARENT_BEATS_ID],
it[BEATS.TRACK_ID], it[BEATS.FRAME_INDICES], it[BEATS.CREATOR_USER_ID],
it[BEATS.CREATION_TIMESTAMP] )*
I assume this is some kind of reflection problem. What can be the missing
type? The dependencies *look *OK, to me, but I have no other ideas beyond
that.
Other pojos work just fine.
Only two pojos cause this kind of problem and both have a field of array
type. In both cases the type of the element of the array is converted using
a org.jooq.Converter. This is not changed during the refactoring.
Could you help me understand what is happening?
Thanks,
Maurizio.
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jooq-user/92ee8781-9d5d-46ee-aa05-cb856c6250b2n%40googlegroups.com.