Not Skipping exceptions in spring batch -
spring batch not able skip below exception. can body suggest did miss here?
<batch:job id="runpromotion"> <batch:step id="readpromotionstep"> <batch:tasklet ref="processpromotion"></batch:tasklet> <batch:next on="success" to="getpromotionalpoints" /> <batch:end on="failed"></batch:end> <batch:listeners> <batch:listener ref="queryprovider"/> </batch:listeners> </batch:step> <batch:step id="getpromotionalpoints"> <batch:tasklet > <batch:chunk reader="transactiondatareader" writer="userpromotionwriter" commit-interval="100" skip-limit="100"> <batch:skippable-exception-classes > <batch:include class="org.hibernate.exception.constraintviolationexception"/> <batch:include class="javax.persistence.persistenceexception"/> </batch:skippable-exception-classes> </batch:chunk> </batch:tasklet> <batch:listeners> <batch:listener ref="queryprovider"/> </batch:listeners> </batch:step> </batch:job>
below error while running batch :
2013-08-24 14:43:16,451 - [main] warn : org.hibernate.engine.jdbc.spi.sqlexceptionhelper:143 - sql error: 1062, sqlstate: 23000 2013-08-24 14:43:16,451 - [main] error: org.hibernate.engine.jdbc.spi.sqlexceptionhelper:144 - duplicate entry '1' key 'promotion_id' javax.persistence.persistenceexception: org.hibernate.exception.constraintviolationexception: duplicate entry '1' key 'promotion_id' @ org.hibernate.ejb.abstractentitymanagerimpl.convert(abstractentitymanagerimpl.java:1377)
Comments
Post a Comment