jersy opened a new issue, #1950:
URL: https://github.com/apache/incubator-seatunnel/issues/1950

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   TiDB connector do not work
   
   ### SeaTunnel Version
   
   2.1.1
   
   ### SeaTunnel Config
   
   ```conf
   env {
       spark.tispark.pd.addresses = "127.0.0.1:2379"
       spark.sql.extensions = "org.apache.spark.sql.TiExtensions"
   }
   
   tidb {
       addr = "127.0.0.1",
       port = "4000"
       database = "database",
       table = "tableName",
       user = "userName",
       password = "***********"
   }
   ```
   
   
   ### Running Command
   
   ```shell
   bin/start-seatunnel-spark.sh \
       -c config-path \
       -m master \
   ```
   
   
   ### Error Exception
   
   ```log
   2022-05-25 18:03:26,380 INFO  (main) [Logging.scala:logInfo(54)] - Parsing 
command: select id from test_table
   Exception in thread "main" java.lang.NoSuchMethodError: 
org.apache.spark.sql.TiExtensions$.getTiContext(Lorg/apache/spark/sql/SparkSession;)Lscala/Option;
           at com.pingcap.tispark.write.TiDBWriter$.write(TiDBWriter.scala:31)
           at 
com.pingcap.tispark.TiDBDataSource.createRelation(TiDBDataSource.scala:57)
           at 
org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:45)
           at 
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)
           at 
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68)
           at 
org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:86)
           at 
org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:131)
           at 
org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:127)
           at 
org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:155)
           at 
org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
           at 
org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:152)
           at 
org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:127)
           at 
org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:80)
           at 
org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:80)
           at 
org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:676)
           at 
org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:676)
           at 
org.apache.spark.sql.execution.SQLExecution$$anonfun$withNewExecutionId$1.apply(SQLExecution.scala:78)
           at 
org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:125)
           at 
org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:73)
           at 
org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:676)
           at 
org.apache.spark.sql.DataFrameWriter.saveToV1Source(DataFrameWriter.scala:285)
           at 
org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:271)
   ```
   
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to