org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback

Spring JIRA | Gerson | 7 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    [BATCH-950] Exception during rollback hides root cause - Spring JIRA

    spring.io | 1 year ago
    org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback
  2. 0

    If an exception is thrown while processing a rollback the root exception fails to be logged. In ItemOrientedStep it catches Exception then calls processRollback but if processRollback throws an exception the original cause is never even logged, making it very difficult to track down the root cause of the exception. Perhaps changing the code from: catch (Exception e) { processRollback(stepExecution, contribution, fatalException, transaction); throw e; } to: catch (Exception e) { try { processRollback(stepExecution, contribution, fatalException, transaction); throw e; } catch (Exception rollbackException) { logger.error("Exception thrown during processRollback will be propegated, exception that caused the rollback follows", e); throw rollbackException; } } An example stack trace for this problem is: org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback at org.springframework.batch.core.step.item.ItemOrientedStep.processRollback(ItemOrientedStep.java:428) at org.springframework.batch.core.step.item.ItemOrientedStep.access$1000(ItemOrientedStep.java:68) at org.springframework.batch.core.step.item.ItemOrientedStep$1.doInIteration(ItemOrientedStep.java:347) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:346) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:212) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) at org.springframework.batch.core.step.item.ItemOrientedStep.doExecute(ItemOrientedStep.java:231) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:172) at org.springframework.batch.core.job.SimpleJob.execute(SimpleJob.java:100) at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:86) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:81) at org.jasig.portal.stats.quartz.JobLauncherDetails.executeInternal(JobLauncherDetails.java:71) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back JDBC transaction; nested exception is java.sql.SQLException: Protocol violation at org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:279) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777) at org.springframework.batch.core.step.item.ItemOrientedStep.processRollback(ItemOrientedStep.java:419) ... 15 more Caused by: java.sql.SQLException: Protocol violation at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:439) at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:130) at oracle.jdbc.driver.T4CConnection.doRollback(T4CConnection.java:613) at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:3389) at org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:328) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.rollback(PoolingDataSource.java:312) at org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:276) ... 18 more

    Spring JIRA | 7 years ago | Gerson
    org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback
  3. 0

    If an exception is thrown while processing a rollback the root exception fails to be logged. In ItemOrientedStep it catches Exception then calls processRollback but if processRollback throws an exception the original cause is never even logged, making it very difficult to track down the root cause of the exception. Perhaps changing the code from: catch (Exception e) { processRollback(stepExecution, contribution, fatalException, transaction); throw e; } to: catch (Exception e) { try { processRollback(stepExecution, contribution, fatalException, transaction); throw e; } catch (Exception rollbackException) { logger.error("Exception thrown during processRollback will be propegated, exception that caused the rollback follows", e); throw rollbackException; } } An example stack trace for this problem is: org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback at org.springframework.batch.core.step.item.ItemOrientedStep.processRollback(ItemOrientedStep.java:428) at org.springframework.batch.core.step.item.ItemOrientedStep.access$1000(ItemOrientedStep.java:68) at org.springframework.batch.core.step.item.ItemOrientedStep$1.doInIteration(ItemOrientedStep.java:347) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:346) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:212) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) at org.springframework.batch.core.step.item.ItemOrientedStep.doExecute(ItemOrientedStep.java:231) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:172) at org.springframework.batch.core.job.SimpleJob.execute(SimpleJob.java:100) at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:86) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:81) at org.jasig.portal.stats.quartz.JobLauncherDetails.executeInternal(JobLauncherDetails.java:71) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back JDBC transaction; nested exception is java.sql.SQLException: Protocol violation at org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:279) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777) at org.springframework.batch.core.step.item.ItemOrientedStep.processRollback(ItemOrientedStep.java:419) ... 15 more Caused by: java.sql.SQLException: Protocol violation at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:439) at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:130) at oracle.jdbc.driver.T4CConnection.doRollback(T4CConnection.java:613) at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:3389) at org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:328) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.rollback(PoolingDataSource.java:312) at org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:276) ... 18 more

    Spring JIRA | 8 years ago | Eric Dalquist
    org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    If an exception is thrown while processing a rollback the root exception fails to be logged. In ItemOrientedStep it catches Exception then calls processRollback but if processRollback throws an exception the original cause is never even logged, making it very difficult to track down the root cause of the exception. Perhaps changing the code from: catch (Exception e) { processRollback(stepExecution, contribution, fatalException, transaction); throw e; } to: catch (Exception e) { try { processRollback(stepExecution, contribution, fatalException, transaction); throw e; } catch (Exception rollbackException) { logger.error("Exception thrown during processRollback will be propegated, exception that caused the rollback follows", e); throw rollbackException; } } An example stack trace for this problem is: org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback at org.springframework.batch.core.step.item.ItemOrientedStep.processRollback(ItemOrientedStep.java:428) at org.springframework.batch.core.step.item.ItemOrientedStep.access$1000(ItemOrientedStep.java:68) at org.springframework.batch.core.step.item.ItemOrientedStep$1.doInIteration(ItemOrientedStep.java:347) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:346) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:212) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) at org.springframework.batch.core.step.item.ItemOrientedStep.doExecute(ItemOrientedStep.java:231) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:172) at org.springframework.batch.core.job.SimpleJob.execute(SimpleJob.java:100) at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:86) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:81) at org.jasig.portal.stats.quartz.JobLauncherDetails.executeInternal(JobLauncherDetails.java:71) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back JDBC transaction; nested exception is java.sql.SQLException: Protocol violation at org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:279) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777) at org.springframework.batch.core.step.item.ItemOrientedStep.processRollback(ItemOrientedStep.java:419) ... 15 more Caused by: java.sql.SQLException: Protocol violation at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:439) at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:130) at oracle.jdbc.driver.T4CConnection.doRollback(T4CConnection.java:613) at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:3389) at org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:328) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.rollback(PoolingDataSource.java:312) at org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:276) ... 18 more

    Spring JIRA | 7 years ago | Gerson
    org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback
  6. 0

    If an exception is thrown while processing a rollback the root exception fails to be logged. In ItemOrientedStep it catches Exception then calls processRollback but if processRollback throws an exception the original cause is never even logged, making it very difficult to track down the root cause of the exception. Perhaps changing the code from: catch (Exception e) { processRollback(stepExecution, contribution, fatalException, transaction); throw e; } to: catch (Exception e) { try { processRollback(stepExecution, contribution, fatalException, transaction); throw e; } catch (Exception rollbackException) { logger.error("Exception thrown during processRollback will be propegated, exception that caused the rollback follows", e); throw rollbackException; } } An example stack trace for this problem is: org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback at org.springframework.batch.core.step.item.ItemOrientedStep.processRollback(ItemOrientedStep.java:428) at org.springframework.batch.core.step.item.ItemOrientedStep.access$1000(ItemOrientedStep.java:68) at org.springframework.batch.core.step.item.ItemOrientedStep$1.doInIteration(ItemOrientedStep.java:347) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:346) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:212) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) at org.springframework.batch.core.step.item.ItemOrientedStep.doExecute(ItemOrientedStep.java:231) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:172) at org.springframework.batch.core.job.SimpleJob.execute(SimpleJob.java:100) at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:86) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:81) at org.jasig.portal.stats.quartz.JobLauncherDetails.executeInternal(JobLauncherDetails.java:71) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back JDBC transaction; nested exception is java.sql.SQLException: Protocol violation at org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:279) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777) at org.springframework.batch.core.step.item.ItemOrientedStep.processRollback(ItemOrientedStep.java:419) ... 15 more Caused by: java.sql.SQLException: Protocol violation at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:439) at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:130) at oracle.jdbc.driver.T4CConnection.doRollback(T4CConnection.java:613) at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:3389) at org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:328) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.rollback(PoolingDataSource.java:312) at org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:276) ... 18 more

    Spring JIRA | 8 years ago | Eric Dalquist
    org.springframework.batch.core.step.AbstractStep$FatalException: Failed while processing rollback

  1. treefolk 8 times, last 4 months ago
8 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    Protocol violation

    at oracle.jdbc.driver.SQLStateMapping.newSQLException()
  2. Oracle jdbc
    PhysicalConnection.rollback
    1. oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    2. oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
    3. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
    4. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
    5. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:439)
    6. oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:130)
    7. oracle.jdbc.driver.T4CConnection.doRollback(T4CConnection.java:613)
    8. oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:3389)
    8 frames
  3. Commons DBCP
    PoolingDataSource$PoolGuardConnectionWrapper.rollback
    1. org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:328)
    2. org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.rollback(PoolingDataSource.java:312)
    2 frames
  4. Spring Framework
    DataSourceTransactionManager.doRollback
    1. org.springframework.jdbc.datasource.DataSourceTransactionManager.doRollback(DataSourceTransactionManager.java:276)
    1 frame
  5. Spring Tx
    AbstractPlatformTransactionManager.rollback
    1. org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800)
    2. org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777)
    2 frames
  6. Spring Batch Core
    ItemOrientedStep$1.doInIteration
    1. org.springframework.batch.core.step.item.ItemOrientedStep.processRollback(ItemOrientedStep.java:419)
    2. org.springframework.batch.core.step.item.ItemOrientedStep.access$1000(ItemOrientedStep.java:68)
    3. org.springframework.batch.core.step.item.ItemOrientedStep$1.doInIteration(ItemOrientedStep.java:347)
    3 frames
  7. Spring Batch Infrastructure
    RepeatTemplate.iterate
    1. org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:346)
    2. org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:212)
    3. org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143)
    3 frames
  8. Spring Batch Core
    SimpleJobLauncher$1.run
    1. org.springframework.batch.core.step.item.ItemOrientedStep.doExecute(ItemOrientedStep.java:231)
    2. org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:172)
    3. org.springframework.batch.core.job.SimpleJob.execute(SimpleJob.java:100)
    4. org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:86)
    4 frames
  9. Spring Core
    SyncTaskExecutor.execute
    1. org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
    1 frame
  10. Spring Batch Core
    SimpleJobLauncher.run
    1. org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:81)
    1 frame
  11. org.jasig.portal
    JobLauncherDetails.executeInternal
    1. org.jasig.portal.stats.quartz.JobLauncherDetails.executeInternal(JobLauncherDetails.java:71)
    1 frame
  12. Spring Context Support
    QuartzJobBean.execute
    1. org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
    1 frame
  13. quartz
    SimpleThreadPool$WorkerThread.run
    1. org.quartz.core.JobRunShell.run(JobRunShell.java:203)
    2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    2 frames