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

   ### 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
   
   
需要将pg数据库中的数据传输到hdfs中,相同的配置文件在IDEA中可以正常运行,当代码编译打包后,提交到服务器中,除了pg到hdfs运行会出现异常,其它可以正常运行,如:hdfs到pg、pg到pg、pg到Doris等。
   
   ### SeaTunnel Version
   
   dev版本
   
   ### SeaTunnel Config
   
   ```conf
   env {
       execution.parallelism = 1
       job.mode = "BATCH"
   }
   
   source {
       Jdbc {
           url = "jdbc:postgresql://192.168.10.216:5432/selection"
           driver = "org.postgresql.Driver"
           connection_check_timeout_sec = 100
           user = "xxx"
           password = "xxx"
           query = "select * from public.us_all_syn_st_2023_34 limit 10000"
       }
   }
   
   transform {
   
   }
   
   sink {
       HdfsFile {
         fs.defaultFS = "hdfs://hadoop15:8020"
         path = "/user/root/test4"
         file_format = "text"
       }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   sh /opt/module/seatunnel/bin/seatunnel.sh --config 
/home/xxx/conf/selection.conf -e local
   ```
   
   
   ### Error Exception
   
   ```log
   Exception in thread "main" java.util.ServiceConfigurationError: 
org.apache.seatunnel.api.sink.SeaTunnelSink: Provider 
org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSink could not be 
instantiated
           at java.util.ServiceLoader.fail(ServiceLoader.java:232)
           at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
           at 
java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
           at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
           at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
           at 
org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery.loadPluginInstance(AbstractPluginDiscovery.java:302)
           at 
org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery.createOptionalPluginInstance(AbstractPluginDiscovery.java:183)
           at 
org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery.createPluginInstance(AbstractPluginDiscovery.java:227)
           at 
org.apache.seatunnel.engine.core.parse.ConnectorInstanceLoader.loadSinkInstance(ConnectorInstanceLoader.java:77)
           at 
org.apache.seatunnel.engine.core.parse.JobConfigParser.parseSink(JobConfigParser.java:198)
           at 
org.apache.seatunnel.engine.core.parse.JobConfigParser.parseSinks(JobConfigParser.java:174)
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSink(MultipleTableJobConfigParser.java:528)
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:190)
           at 
org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:88)
           at 
org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:161)
           at 
org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:144)
           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: java.lang.InstantiationException: 
org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSink
           at java.lang.Class.newInstance(Class.java:427)
           at 
java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
           ... 15 more
   Caused by: java.lang.NoSuchMethodException: 
org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSink.<init>()
           at java.lang.Class.getConstructor0(Class.java:3082)
           at java.lang.Class.newInstance(Class.java:412)
           ... 16 more
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   2.3.4
   
   ### Java or Scala Version
   
   jdk1.8
   
   ### Screenshots
   
   
![image](https://github.com/apache/seatunnel/assets/124546333/454b1922-6a8d-4879-b2fb-a804c296ca59)
   
   
   ### 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