Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No serializer found for class org.jooq.impl.DefaultBinding

Tags:

java

sql

jooq

As part of my spring boot application, I am auto-generating my DO classes using jooq. After getting this data from db as do object, I am trying to convert it to map using jackson library. But it is giving the error:

com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.jooq.impl.DefaultBinding and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)

Can I get some help on this?

like image 929
techie tech Avatar asked Oct 20 '25 11:10

techie tech


1 Answers

As of jOOQ version 3.10, you cannot simply serialise / deserialise jOOQ Record types using Jackson without specifying your own custom bindings. Another option is to map the jOOQ Record into your own POJO ("DO") object first, e.g. using:

Result<Record> result = ctx.select(...).from(...).fetch();
List<MyPojo> list = result.into(MyPojo.class);

And then you should be able to easily serialise that list instead.

like image 63
Lukas Eder Avatar answered Oct 23 '25 00:10

Lukas Eder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!