java - Spring Batch - exception is not skippable -
this code:
<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, exception not skippable.; nested exception org.springframework.jdbc.uncategorizedsqlexception: preparedstatementcallback; uncategorized sqlexception sql [ merge fhd_gtgt_gen_txn_x txn using (
i want understand : "exception not skippable" , how can make piece of code work? currently, step failing leading termination of job.
spring batch: spring-batch-2.1.xsd
the exception sql exception - sqlexception:
org.springframework.jdbc.uncategorizedsqlexception
your skip rule refers java.lang exceptions. if want sql exception skipped well, must include in skip rules. somewhere in stack trace give exact exception can include if want records encounter exception skipped. recommended skip exceptions more specific errors not masked skipping.
<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>
Comments
Post a Comment