apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
https://seatunnel.apache.org/
Apache License 2.0
7.86k stars 1.77k forks source link

[Bug] [Connect jdbc] ErrorDescription:[No suitable dialect factory found] #4162

Open eanfs opened 1 year ago

eanfs commented 1 year ago

Search before asking

What happened

use jdbc Connect and copy mysql-connector-java-8.0.28.jar to plugins/jdbc/lib got exception below

SeaTunnel Version

2.3.0

SeaTunnel Config

env {
  execution.parallelism = 1
  job.mode = "BATCH"
}

source {
    Jdbc {
        url = "jdbc:mysql://localhost:3306/mysql?serverTimezone=GMT%2b8"
        driver = "com.mysql.cj.jdbc.Driver"
        connection_check_timeout_sec = 100
        user = "root"
        password = "WGlEaW5nQ2xvdW"
        query = "select * from help_keyword"
    }
}

transform {

}

sink {
    Console {}
}

Running Command

./bin/seatunnel.sh --config ./config/test-batch-mysql.conf -e local

Error Exception

Exception in thread "main" org.apache.seatunnel.connectors.seatunnel.jdbc.exception.JdbcConnectorException: ErrorCode:[JDBC-06], ErrorDescription:[No suitable dialect factory found] - Could not find any jdbc dialect factories that implement 'org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialectFactory' in the classpath.
    at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialectLoader.load(JdbcDialectLoader.java:53)
    at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSource.prepare(JdbcSource.java:80)
    at org.apache.seatunnel.engine.core.parse.ConnectorInstanceLoader.loadSourceInstance(ConnectorInstanceLoader.java:60)
    at org.apache.seatunnel.engine.core.parse.JobConfigParser.sampleAnalyze(JobConfigParser.java:314)
    at org.apache.seatunnel.engine.core.parse.JobConfigParser.parse(JobConfigParser.java:125)
    at org.apache.seatunnel.engine.client.job.JobExecutionEnvironment.getLogicalDag(JobExecutionEnvironment.java:129)
    at org.apache.seatunnel.engine.client.job.JobExecutionEnvironment.execute(JobExecutionEnvironment.java:121)
    at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:91)
    at org.apache.seatunnel.core.starter.Seatunnel.run(Seatunnel.java:39)
    at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:31)

Flink or Spark Version

No response

Java or Scala Version

java 11

Screenshots

No response

Are you willing to submit PR?

Code of Conduct

eanfs commented 1 year ago

run the same config was success with java 8.0.362

zorrofox commented 1 year ago

I have the same problem in Java 11 in docker eclipse-temurin:11-jre-jammy, and I will try eclipse-temurin:8-jre-jammy.

zorrofox commented 1 year ago

I think this indeed the Java11 issue, can someone look at this?

YuriyGavrilov commented 10 months ago

manly the same but little bit diff. with Trino JDBC Driver. https://trino.io/docs/current/client/jdbc.html