Spring Cloud Data Flow fails with MySQL syntax errors. The error messages can be similar to the following:
2025-07-08 18:07:18.122 WARN 1 --- [nio-8080-exec-5] o.m.jdbc.message.server.ErrorPacket : Error: 1054-42S22: Unknown column 'next_val' in 'SELECT'
2025-07-08 18:07:18.186 ERROR 1 --- [nio-8080-exec-5] o.hibernate.id.enhanced.TableStructure : could not read a hi value
java.sql.SQLSyntaxErrorException: (conn=90845) Unknown column 'next_val' in 'SELECT'
.
.
.
2025-07-08 18:07:18.194 WARN 1 --- [nio-8080-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 1054, SQLState: 42S22
2025-07-08 18:07:18.196 ERROR 1 --- [nio-8080-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper : (conn=90845) Unknown column 'next_val' in 'SELECT'
2025-07-08 18:07:18.210 ERROR 1 --- [nio-8080-exec-5] o.s.c.d.s.c.RestControllerAdvice : Caught exception while handling a request
org.springframework.dao.InvalidDataAccessResourceUsageException: error performing isolated work; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: error performing isolated work
This issue can be caused by an incorrect DB dialect being used. The following errors found on logs show evidence of dialect issues:
org.springframework.dao.InvalidDataAccessResourceUsageException: error performing isolated work; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: error performing isolated work
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259) ~[spring-orm-5.3.42.jar:5.3.42]
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:233) ~[spring-orm-5.3.42.jar:5.3.42]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:551) ~[spring-orm-5.3.42.jar:5.3.42]
In order to correct this issue the customer needs to identify the appropriate dialect required for the dependencies combination they are using and they need to make sure it is configured correctly.
Check the application-database.yaml and check the dialect configuration. Spring requires a property called database-platform to be set as well as the dialect to use. Below is an example of how the dialect definition can look when it fails (the property is not set):
spring:
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.MariaDB106Dialect
And next is an example of the dialect configuration setting the required property:
spring:
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.MariaDB106Dialect
database-platform: org.hibernate.dialect.MariaDB106Dialect
Once the property has been set the dialect setting should be consumed and the MySQL syntax error should be resolved.