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

   ### 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
   
   when i use variable to start flink job, than report an error 
   
   ### SeaTunnel Version
   
   2.1.1
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 1
   }
   
   source {
       FakeSourceStream {
         result_table_name = "fake"
         field_name = "name,age"
       }
   }
   
   transform {
       sql {
         sql = "select name,age from fake where name='"${my_name}"'"
       }
   }
   
   sink {
     ConsoleSink {}
   }
   ```
   
   
   ### Running Command
   
   ```shell
   ./bin/start-seatunnel-flink.sh -c 
~/data_process_test/debug_job/variable_test.conf -i my_name=kid-xiong
   ```
   
   
   ### Error Exception
   
   ```log
   The program finished with the following exception:
   
   org.apache.flink.client.program.ProgramInvocationException: The main method 
caused an error: Was passed main parameter '-Dmy_name=kid-xiong' but no main 
parameter was defined in your arg class
           at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:372)
           at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222)
           at 
org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114)
           at 
org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:812)
           at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:246)
           at 
org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1054)
           at 
org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1132)
           at java.security.AccessController.doPrivileged(Native Method)
           at javax.security.auth.Subject.doAs(Subject.java:422)
           at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1836)
           at 
org.apache.flink.runtime.security.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
           at 
org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1132)
   Caused by: com.beust.jcommander.ParameterException: Was passed main 
parameter '-Dmy_name=kid-xiong' but no main parameter was defined in your arg 
class
           at 
com.beust.jcommander.JCommander.initMainParameterValue(JCommander.java:954)
           at com.beust.jcommander.JCommander.parseValues(JCommander.java:755)
           at com.beust.jcommander.JCommander.parse(JCommander.java:356)
           at com.beust.jcommander.JCommander.parse(JCommander.java:335)
           at 
org.apache.seatunnel.utils.CommandLineUtils.parseFlinkArgs(CommandLineUtils.java:44)
           at org.apache.seatunnel.SeatunnelFlink.main(SeatunnelFlink.java:26)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
           ... 11 more
   ```
   
   
   ### Flink or Spark Version
   
   1.13.6
   
   ### Java or Scala Version
   
   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