Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.
This repository was archived by the owner on May 14, 2025. It is now read-only.

MySQL 5.7 not working w/ SCDF 2.10 when using config server #5164

@onobc

Description

@onobc

Description

SCDF fails to start w/ the following exception:

Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [create sequence if not exists hibernate_sequence start 1 increment 1]; nested exception is java.sql.SQLSyntaxErrorException: (conn=3) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sequence if not exists hibernate_sequence start 1 increment 1' at line 1
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
        at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:431)
        at org.springframework.cloud.dataflow.common.flyway.SqlCommandsRunner.execute(SqlCommandsRunner.java:61)
        at org.springframework.cloud.dataflow.common.flyway.AbstractMigration.migrate(AbstractMigration.java:46)
        at org.flywaydb.core.internal.resolver.java.JavaMigrationExecutor.executeOnce(JavaMigrationExecutor.java:55)
        ... 45 common frames omitted

Environment

  • SCDF: 2.10 w/ config server
  • DB: MySQL 5.7.4
  • Driver: MariaDB

Reproduce

Start Rabbit

docker run -d --hostname rabbitmq --name rabbitmq -p 15672:15672 -p 5672:5672 rabbitmq:3.7

Start MySQL 5.7.4

docker run  --name test-mysql -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=spring -e MYSQL_USER=spring -e MYSQL_PASSWORD=spring -e MYSQL_DATABASE=dataflow mysql:5.7.4

Start config sever

Something like this:

@SpringBootApplication
@EnableConfigServer
public class ConfigServer {
    public static void main(String[] args) {
        SpringApplication.run(ConfigServer.class, args);
    }
}

include these properties:

spring.datasource.driver-class-name: org.mariadb.jdbc.Driver
spring.datasource.url: jdbc:mysql://localhost:3306/dataflow?permitMysqlScheme
spring.datasource.username: spring
spring.datasource.password: spring

Install/run SCDF

mkdir tmp-scdf-210
cd tmp-scdf-210
wget https://repo.spring.io/release/org/springframework/cloud/spring-cloud-dataflow-server/2.10.0/spring-cloud-dataflow-server-2.10.0.jar
java -jar spring-cloud-dataflow-server-2.10.0.jar

AND
💣 💣 💣

Additional context

Note that w/o the config server in the picture all works well

  • Stop the config server.
  • Relaunch SCDF as follows:
java -jar spring-cloud-dataflow-server-2.10.0.jar \
    --spring.datasource.url='jdbc:mysql://localhost:3306/dataflow?permitMysqlScheme' \
    --spring.datasource.username=spring \
    --spring.datasource.password=spring \
    --spring.datasource.driver-class-name=org.mariadb.jdbc.Driver

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions