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

   ### 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
   
   Mongo CDC modify or delete data in incremental stage will generate Java 
lang. NullPointerException lead to abnormal exit Cannot continue to capture 
change
   
   ### SeaTunnel Version
   
   2.3.3
   
   ### SeaTunnel Config
   
   ```conf
   env {
     # You can set engine configuration here
     execution.parallelism = 1
     job.mode = "STREAMING"
     execution.checkpoint.interval = 5000
   }
   
   source {
     MongoDB-CDC {
       hosts = "192.168.0.108:27017"
       database = ["test"]
       collection = ["test.mycol"]
       username = root
       password = Zbw.319776343
       schema = {
         fields {
           "_id" : string,
           "name" : string
         }
       }
   
   
   
     }
   }
   
   # Console printing of the read Mongodb data
   sink {
   MongoDB {
       uri = "mongodb://root:[email protected]:27017"
       database = "test"
       collection = "mycol"
       schema = {
         fields {
           "_id" : string,
           "name" : string
         }
       }
   
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   nohup ./bin/seatunnel.sh --config ./config/test12.config 2>&1 &
   ```
   
   
   ### Error Exception
   
   ```log
   org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException: 
java.lang.RuntimeException: java.lang.NullPointerException
           at 
org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:232)
           at 
org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:61)
           at 
org.apache.seatunnel.engine.server.task.SeaTunnelTransformCollector.collect(SeaTunnelTransformCollector.java:39)
           at 
org.apache.seatunnel.engine.server.task.SeaTunnelTransformCollector.collect(SeaTunnelTransformCollector.java:27)
           at 
org.apache.seatunnel.engine.server.task.group.queue.IntermediateBlockingQueue.handleRecord(IntermediateBlockingQueue.java:76)
           at 
org.apache.seatunnel.engine.server.task.group.queue.IntermediateBlockingQueue.collect(IntermediateBlockingQueue.java:51)
           at 
org.apache.seatunnel.engine.server.task.flow.IntermediateQueueFlowLifeCycle.collect(IntermediateQueueFlowLifeCycle.java:52)
           at 
org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask.collect(TransformSeaTunnelTask.java:73)
           at 
org.apache.seatunnel.engine.server.task.SeaTunnelTask.stateProcess(SeaTunnelTask.java:168)
           at 
org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask.call(TransformSeaTunnelTask.java:78)
           at 
org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:613)
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:750)
   Caused by: java.lang.NullPointerException
           at java.util.Arrays.stream(Arrays.java:5004)
           at 
org.apache.seatunnel.connectors.seatunnel.mongodb.sink.MongoKeyExtractor.apply(MongoKeyExtractor.java:39)
           at 
org.apache.seatunnel.connectors.seatunnel.mongodb.sink.MongoKeyExtractor.apply(MongoKeyExtractor.java:27)
           at 
org.apache.seatunnel.connectors.seatunnel.mongodb.serde.RowDataDocumentSerializer.lambda$createWriteModelSuppliers$1(RowDataDocumentSerializer.java:86)
           at 
org.apache.seatunnel.connectors.seatunnel.mongodb.serde.RowDataDocumentSerializer.serializeToWriteModel(RowDataDocumentSerializer.java:68)
           at 
org.apache.seatunnel.connectors.seatunnel.mongodb.serde.RowDataDocumentSerializer.serializeToWriteModel(RowDataDocumentSerializer.java:43)
           at 
org.apache.seatunnel.connectors.seatunnel.mongodb.sink.MongodbWriter.write(MongodbWriter.java:100)
           at 
org.apache.seatunnel.connectors.seatunnel.mongodb.sink.MongodbWriter.write(MongodbWriter.java:49)
           at 
org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:227)
           ... 15 more
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   
![image](https://github.com/apache/seatunnel/assets/14906989/38386194-11a0-4726-97cb-0cb80d6bf83e)
   
   
   ### 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