Skip to content
Advertisement

Compilation throws `None of the following functions can be called with the arguments supplied`

Trying to implement a custom JSONB binding that maps to an object containing a map. Generated code throws a None of the following functions can be called with the arguments supplied error caused by the following line:

Here’s my configuration:

Also, it seems like the line causing problems is mapping database data to JOOQ’s default JSONB object. Is that what’s causing the issue? Is there anything I may want to do about it? Is there some other way of doing mapping database JSONB data to a map by JOOQ?

Advertisement

Answer

I think you’re confusing the type variables on Binding<T, U> here:

  • T is the database / JDBC type (in this case org.jooq.JSONB)
  • U is the user type (in this case Any)

You have to implement the binding the other way round: Binding<JSONB?, Any?>. Since jOOQ already takes care of properly binding the JSONB type to JDBC, you can probably do with your Converter<JSONB?, Any?> implementation alone, and attach that to your generated code instead:

Also, you don’t have to use your own Jsonb type to wrap JSON data here.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement