bravekong opened a new issue, #3214: URL: https://github.com/apache/incubator-seatunnel/issues/3214
### 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 configure the schema parameter as json, an error is reported:java.lang.ClassCastException: com.fasterxml.jackson.databind.node.ArrayNode cannot be cast to com.fasterxml.jackson.databind.node.ObjectNode ### SeaTunnel Version 2.1.3-release ### SeaTunnel Config ```conf #test_flink_kafka.conf env { execution.parallelism = 1 } source { KafkaTableStream { consumer.bootstrap.servers = "127.0.0.1:9092" consumer.group.id = "console-consumer" topics = hudi-topic result_table_name = test format.type = json schema = "{\"name\":\"string\",\"age\":\"int\"}" } } transform {} sink { ConsoleSink {} } ``` ### Running Command ```shell bin/start-seatunnel-flink.sh --config config/test_flink_kafka.conf ``` ### Error Exception ```log The program finished with the following exception: org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Execute Flink task error 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:1876) 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: org.apache.seatunnel.core.base.exception.CommandExecuteException: Execute Flink task error at org.apache.seatunnel.core.flink.command.FlinkApiTaskExecuteCommand.execute(FlinkApiTaskExecuteCommand.java:85) at org.apache.seatunnel.core.base.Seatunnel.run(Seatunnel.java:40) at org.apache.seatunnel.core.flink.SeatunnelFlink.main(SeatunnelFlink.java:34) 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 Caused by: java.lang.ClassCastException: com.fasterxml.jackson.databind.node.ArrayNode cannot be cast to com.fasterxml.jackson.databind.node.ObjectNode at org.apache.seatunnel.flink.util.SchemaUtil.setSchema(SchemaUtil.java:68) at org.apache.seatunnel.flink.kafka.source.KafkaTableStream.getSchema(KafkaTableStream.java:137) at org.apache.seatunnel.flink.kafka.source.KafkaTableStream.getData(KafkaTableStream.java:128) at org.apache.seatunnel.flink.stream.FlinkStreamExecution.start(FlinkStreamExecution.java:55) at org.apache.seatunnel.core.flink.command.FlinkApiTaskExecuteCommand.execute(FlinkApiTaskExecuteCommand.java:82) ... 18 more ``` ### Flink or Spark Version flink 1.13.6 ### Java or Scala Version java 1.8 ### Screenshots _No response_ ### Are you willing to submit PR? - [X] 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]
