[英]Spring Batch - exception is not skippable
這是我的代碼:
<chunk reader="READER" writer="WRITER"
commit-interval="1000" skip-limit="1000">
<skippable-exception-classes>
<include class="java.lang.Exception"/>
</skippable-exception-classes>
</chunk>
Log Stacktrace:
org.springframework.batch.retry.ExhaustedRetryException: Retry exhausted after last attempt in recovery path, but exception is not skippable.; nested exception is org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [ MERGE INTO FHD_GTGT_GEN_TXN_X TXN USING (
我想了解什么是:“異常不可跳過”,我怎樣才能使這段代碼工作? 目前,該步驟失敗導致作業終止。
Spring Batch: spring-batch-2.1.xsd
例外是SQL異常 - SQLException:
org.springframework.jdbc.UncategorizedSQLException
您的跳過規則僅涉及Java.lang異常。 如果您還希望跳過SQL異常,則還必須將其包含在跳過規則中。 在堆棧跟蹤的某處,它將為您提供確切的異常,如果您希望跳過遇到該異常的記錄,則可以包含該異常。 建議您的跳過異常更具體,以便跳過時不會掩蓋所有錯誤。
<chunk reader="READER" writer="WRITER"
commit-interval="1000" skip-limit="1000">
<skippable-exception-classes>
<include class="java.lang.Exception"/>
<include class="java.sql.SQLException"/>
</skippable-exception-classes>
</chunk>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.