xjdAlan opened a new issue, #7051:
URL: https://github.com/apache/seatunnel/issues/7051

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   I expect to synchronize data tables from PostgreSQL to MySQL, but executing 
tasks always results in an error message. The jdbc URL is invalid:not a valid 
URL
   
   ### SeaTunnel Version
   
   2.3.5
   
   ### SeaTunnel Config
   
   ```conf
   # Defining the runtime environment
   env {
     parallelism = 4
     job.mode = "BATCH"
   }
   source{
       Jdbc {
           url = "jdbc:postgresql://192.168.0.221:5432/studio"
           driver = "org.postgresql.Driver"
           user = "postgres"
           password = "******"
           table_path = "studio.public.account_pptt00"
       }
   }
   
   transform {
       # If you would like to get more information about how to configure 
seatunnel and see full list of transform plugins,
       # please go to https://seatunnel.apache.org/docs/transform-v2/sql
   }
   
   sink {
       jdbc {
           # if you would use json or jsonb type insert please add jdbc url 
stringtype=unspecified option
           url = 
"jdbc:mysql://192.168.0.63:3306/studio_tar?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
           driver = "com.mysql.cj.jdbc.Driver"
           user = "datacenter"
           password = "****"
   
           generate_sink_sql = true
           #You need to configure both database and table
           database = "studio_tar"
           table = "${table_name} "
       }
   
   }
   ```
   
   
   ### Running Command
   
   ```shell
   ./bin/seatunnel.sh --config config/v2.stream.single.pgsql-2-mysql -e local
   ```
   
   
   ### Error Exception
   
   ```log
   Exception in thread "main" 
org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel 
job executed failed
           at 
org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:202)
           at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
           at 
org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
   Caused by: org.apache.seatunnel.api.table.factory.FactoryException: 
ErrorCode:[API-06], ErrorDescription:[Factory initialize failed] - Unable to 
create a source for identifier 'Jdbc'.
           at 
org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:100)
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:332)
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:188)
           at 
org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:88)
           at 
org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:156)
           at 
org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:149)
           ... 2 more
   Caused by: 
org.apache.seatunnel.api.table.catalog.exception.CatalogException: 
ErrorCode:[API-03], ErrorDescription:[Catalog initialize failed] - Failed 
connecting to jdbc:postgresql://192.168.0.221:5432/studio via JDBC.
           at 
org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.getConnection(AbstractJdbcCatalog.java:123)
           at 
org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.open(AbstractJdbcCatalog.java:129)
           at 
org.apache.seatunnel.connectors.seatunnel.jdbc.utils.JdbcCatalogUtils.getTables(JdbcCatalogUtils.java:78)
           at 
org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSource.<init>(JdbcSource.java:57)
           at 
org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceFactory.lambda$createSource$0(JdbcSourceFactory.java:78)
           at 
org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:112)
           at 
org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:73)
           ... 7 more
   Caused by: java.sql.SQLException: not a valid url
           at 
com._4paradigm.openmldb.jdbc.SQLDriver.parseAndMergeClusterProps(SQLDriver.java:84)
           at com._4paradigm.openmldb.jdbc.SQLDriver.connect(SQLDriver.java:52)
           at java.sql.DriverManager.getConnection(DriverManager.java:664)
           at java.sql.DriverManager.getConnection(DriverManager.java:247)
           at 
org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.getConnection(AbstractJdbcCatalog.java:119)
           ... 13 more
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to