xi-xi-jun opened a new issue, #6478:
URL: https://github.com/apache/seatunnel/issues/6478

   ### 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 have deployed SeaTunnel versions 2.3.3 and 2.3.4 and encountered an issue 
where JSON scripts that were built could not be executed. Through testing, I 
found that configurations in HOCON format can be executed, but JSON scripts 
built strictly according to the official documentation fail to run. The error 
message displayed in the console is: java.util.ArrayList cannot be cast to 
java.util.Map. I am not sure if this is a bug, but I hope the developers can 
take a look at this issue. Thank you. Below are the relevant scripts and error 
logs:
   HOCON configuration files can be executed correctly:
   
![image](https://github.com/apache/seatunnel/assets/113566654/2e890487-13e8-49bb-8d2f-94980304f217)
   JSON configuration file execution failed:
   
![image](https://github.com/apache/seatunnel/assets/113566654/9333b912-c87a-4224-8d30-7eddd74402cb)
   console log:
   
![image](https://github.com/apache/seatunnel/assets/113566654/7af457e6-ed43-469f-ac73-90cbf266ac80)
   
   
   
   
   ### SeaTunnel Version
   
   2.3.4
   2.3.3
   
   ### SeaTunnel Config
   
   ```conf
   {
       "env" : {
           "execution.parallelism" : 1,
           "job.mode" : "BATCH",
           "checkpoint.interval" : 10000
       },
       "source" : [
           {
               "password" : "xxxxxxx",
               "driver" : "org.postgresql.Driver",
               "query" : "SELECT * FROM t_user",
               "result_table_name" : "source1",
               "plugin_name" : "Jdbc",
               "user" : "postgres",
               "url" : "jdbc:postgresql://ip:5432/syn_data"
           }
       ],
       "sink" : [
           {
               "plugin_name" : "Console"
           }
       ]
   }
   ```
   
   
   ### Running Command
   
   ```shell
   ./bin/seatunnel.sh --config ./custom/test2.conf -e local
   ```
   
   
   ### Error Exception
   
   ```log
   2024-03-10 18:49:32,447 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - 
Exception 
StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: 
SeaTunnel job executed failed
           at 
org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:199)
           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.ClassCastException: java.util.ArrayList cannot be cast 
to java.util.Map
           at java.util.ArrayList.forEach(ArrayList.java:1259)
           at 
org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.processConfig(ConfigShadeUtils.java:150)
           at 
org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.decryptConfig(ConfigShadeUtils.java:119)
           at 
org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.decryptConfig(ConfigShadeUtils.java:104)
           at 
org.apache.seatunnel.core.starter.utils.ConfigBuilder.ofInner(ConfigBuilder.java:53)
           at 
org.apache.seatunnel.core.starter.utils.ConfigBuilder.lambda$of$1(ConfigBuilder.java:67)
           at java.util.Optional.orElseGet(Optional.java:267)
           at 
org.apache.seatunnel.core.starter.utils.ConfigBuilder.of(ConfigBuilder.java:67)
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.<init>(MultipleTableJobConfigParser.java:130)
           at 
org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getJobConfigParser(ClientJobExecutionEnvironment.java:82)
           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:146)
           ... 2 more
    
   2024-03-10 18:49:32,447 ERROR [o.a.s.c.s.SeaTunnel           ] [main] - 
   
===============================================================================
   
   
   
   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:199)
           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.ClassCastException: java.util.ArrayList cannot be cast 
to java.util.Map
           at java.util.ArrayList.forEach(ArrayList.java:1259)
           at 
org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.processConfig(ConfigShadeUtils.java:150)
           at 
org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.decryptConfig(ConfigShadeUtils.java:119)
           at 
org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.decryptConfig(ConfigShadeUtils.java:104)
           at 
org.apache.seatunnel.core.starter.utils.ConfigBuilder.ofInner(ConfigBuilder.java:53)
           at 
org.apache.seatunnel.core.starter.utils.ConfigBuilder.lambda$of$1(ConfigBuilder.java:67)
           at java.util.Optional.orElseGet(Optional.java:267)
           at 
org.apache.seatunnel.core.starter.utils.ConfigBuilder.of(ConfigBuilder.java:67)
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.<init>(MultipleTableJobConfigParser.java:130)
           at 
org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getJobConfigParser(ClientJobExecutionEnvironment.java:82)
           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:146)
           ... 2 more
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   JDK 1.8
   
   ### 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