DanielCarter-stack commented on issue #10417:
URL: https://github.com/apache/seatunnel/issues/10417#issuecomment-3817648309

   <!-- code-pr-reviewer -->
   Based on the stack trace at line 138 and code analysis, the NPE is caused by 
`paimonCatalog` being null when the `PaimonSinkWriter` constructor is called 
during checkpoint recovery.
   
   The root cause is in the `PaimonSink` constructor (lines 100-126): when the 
database or table does not exist, the constructor returns early (lines 105 and 
110), leaving the `paimonTable` field as null. During checkpoint recovery, the 
`restoreWriter` method (lines 154-167) then uses this null `paimonTable` to 
create a `PaimonSinkWriter`, triggering the NPE.
   
   This appears to be fixed in later commits on the dev branch (e.g., 
085023ad0), which adds null checks and proper error handling for missing tables.
   
   To verify: Could you provide your SeaTunnel version and confirm whether the 
Paimon table exists when the job starts? If this is a known issue, upgrading to 
the latest version or applying the fix from the dev branch should resolve it.
   
   Relevant files:
   - 
`seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSink.java`
   - 
`seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSinkWriter.java`


-- 
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