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

   ### 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
   
   source is KafkaTableStream and the schema uses the example. but the flink 
job error : com.fasterxml.jackson.databind.node.ArrayNode cannot be cast to 
com.fasterxml.jackson.databind.node.ObjectNode
   
   ### SeaTunnel Version
   
   v2.1.2
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism=1
   }
   
   source {
     KafkaTableStream {
         consumer.bootstrap.servers = "192.168.10.102:9092"
         consumer.group.id = "seatunnel-learn"
         topics = test_csv
         result_table_name = test
         format.type = csv
         schema = 
"[{\"field\":\"name\",\"type\":\"string\"},{\"field\":\"age\",\"type\":\"int\"}]"
         format.field-delimiter = ";"
         format.allow-comments = "true"
         format.ignore-parse-errors = "true"
     }
   }
   
   transform {
     sql {
       sql = "select name, age from test where age > 18"
     }
   }
   
   sink {
     Kafka {
       topics = "test_sink"
       producer.bootstrap.server = "192.168.10.102:9092"
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   ./bin/start-seatunnel-flink.sh --config ./config/kafkaETL.conf
   ```
   
   
   ### Error Exception
   
   ```log
   Exception in thread "main" java.lang.RuntimeException: Execute Flink task 
error
        at 
org.apache.seatunnel.core.flink.command.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:84)
        at org.apache.seatunnel.core.base.Seatunnel.run(Seatunnel.java:39)
        at 
org.apache.seatunnel.example.flink.LocalFlinkExample.main(LocalFlinkExample.java:40)
   Caused by: java.lang.RuntimeException: String json deserialization exception.
        at 
org.apache.seatunnel.common.utils.JsonUtils.parseObject(JsonUtils.java:242)
        at 
org.apache.seatunnel.flink.kafka.source.KafkaTableStream.prepare(KafkaTableStream.java:114)
        at 
org.apache.seatunnel.flink.kafka.source.KafkaTableStream.prepare(KafkaTableStream.java:51)
        at 
org.apache.seatunnel.core.base.command.BaseTaskExecuteCommand.lambda$prepare$0(BaseTaskExecuteCommand.java:67)
        at java.util.ArrayList.forEach(ArrayList.java:1259)
        at 
org.apache.seatunnel.core.base.command.BaseTaskExecuteCommand.prepare(BaseTaskExecuteCommand.java:67)
        at 
org.apache.seatunnel.core.flink.command.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:80)
        ... 2 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.common.utils.JsonUtils.parseObject(JsonUtils.java:239)
        ... 8 more
   ```
   
   
   ### Flink or Spark Version
   
   Flink 1.13.6
   
   ### Java or Scala Version
   
   Java 1.8
   scala 2.12
   
   ### 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]

Reply via email to