Search code examples
spring-bootjooq

Jooq and Spring boot: Upgraded JOOQ via starter: failed to bind spring.jooq.sql-dialect' to org.jooq.SQLDialect


So i upgraded spring-boot-parent-starter to 2.2.8.RELEASE, which results in jooq 3.12.4 . Previously i had 3.11.5.

I am getting the following error

Failed to bind properties under 'spring.jooq.sql-dialect' to org.jooq.SQLDialect:

Property: spring.jooq.sqldialect
Value: MYSQL_5_7
Origin: "spring.jooq.SQLDialect" from property source "applicationConfig: [classpath:/config/application.yaml]"
Reason: failed to convert java.lang.String to org.jooq.SQLDialect

Here is what my application.yaml was before

spring:
  jooq:
    sql-dialect: mysql_5_7

Solution

  • If you read the whole error message you will see this:

    Failed to bind properties under 'spring.jooq.sql-dialect' to org.jooq.SQLDialect:
    
        Property: spring.jooq.sql-dialect
        Value: MYSQL_5_7
        Origin: class path resource [application.properties]:2:25
        Reason: failed to convert java.lang.String to org.jooq.SQLDialect
    
    Action:
    
    Update your application's configuration. The following values are valid:
    
        CUBRID
        DEFAULT
        DERBY
        FIREBIRD
        H2
        HSQLDB
        MARIADB
        MYSQL
        POSTGRES
        SQL99
        SQLITE
    

    MYSQL_5_7 is not a value supported by jOOQ open source. It's only availble in the pro version

    MYSQL_5_7
    @Pro
    public static final SQLDialect MYSQL_5_7
    The MySQL 5.7 dialect.
    This dialect is available in commercial jOOQ distributions, only.