org.springframework.batch.core.step.FatalStepExecutionException: JobRepository failure forcing exit with unknown status

Spring JIRA | ak | 3 years ago
  1. 0

    Need to synchronize the stepExecution in org.springframework.batch.core.repository.dao.JdbcExecutionContextDao in the method updateExecutionContext(final StepExecution stepExecution), in order to prevent concurrency failures if two threads are trying to update the same step execution context record. It appears this is already done in JdbcStepExecutionDao.updateStepExecution at line 162: // Attempt to prevent concurrent modification errors by blocking here if // someone is already trying to do it. synchronized (stepExecution) { The error we are getting when our multithreaded tasklet is processing is: "org.springframework.batch.core.step.FatalStepExecutionException: JobRepository failure forcing exit with unknown status at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:441) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:264) at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76) at org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate$ExecutingRunnable.run(TaskExecutorRepeatTemplate.java:258) at java.lang.Thread.run(Thread.java:679) Caused by: org.springframework.dao.ConcurrencyFailureException: PreparedStatementCallback; SQL [UPDATE BATCH_STEP_EXECUTION_CONTEXT SET SHORT_CONTEXT = ?, SERIALIZED_CONTEXT = ? WHERE STEP_EXECUTION_ID = ?]; [Teradata Database] [TeraJDBC 14.00.00.37] [Error 2631] [SQLState 40001] Transaction ABORTed due to deadlock.; nested exception is com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 14.00.00.37] [Error 2631] [SQLState 40001] Transaction ABORTed due to deadlock. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:110) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:605) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:818) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:874) at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.persistSerializedContext(JdbcExecutionContextDao.java:193) at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.updateExecutionContext(JdbcExecutionContextDao.java:136) at org.springframework.batch.core.repository.support.SimpleJobRepository.updateExecutionContext(SimpleJobRepository.java:184) at sun.reflect.GeneratedMethodAccessor381.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccesso"

    Spring JIRA | 3 years ago | ak
    org.springframework.batch.core.step.FatalStepExecutionException: JobRepository failure forcing exit with unknown status
  2. 0

    Need to synchronize the stepExecution in org.springframework.batch.core.repository.dao.JdbcExecutionContextDao in the method updateExecutionContext(final StepExecution stepExecution), in order to prevent concurrency failures if two threads are trying to update the same step execution context record. It appears this is already done in JdbcStepExecutionDao.updateStepExecution at line 162: // Attempt to prevent concurrent modification errors by blocking here if // someone is already trying to do it. synchronized (stepExecution) { The error we are getting when our multithreaded tasklet is processing is: "org.springframework.batch.core.step.FatalStepExecutionException: JobRepository failure forcing exit with unknown status at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:441) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:264) at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76) at org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate$ExecutingRunnable.run(TaskExecutorRepeatTemplate.java:258) at java.lang.Thread.run(Thread.java:679) Caused by: org.springframework.dao.ConcurrencyFailureException: PreparedStatementCallback; SQL [UPDATE BATCH_STEP_EXECUTION_CONTEXT SET SHORT_CONTEXT = ?, SERIALIZED_CONTEXT = ? WHERE STEP_EXECUTION_ID = ?]; [Teradata Database] [TeraJDBC 14.00.00.37] [Error 2631] [SQLState 40001] Transaction ABORTed due to deadlock.; nested exception is com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 14.00.00.37] [Error 2631] [SQLState 40001] Transaction ABORTed due to deadlock. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:110) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:605) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:818) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:874) at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.persistSerializedContext(JdbcExecutionContextDao.java:193) at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.updateExecutionContext(JdbcExecutionContextDao.java:136) at org.springframework.batch.core.repository.support.SimpleJobRepository.updateExecutionContext(SimpleJobRepository.java:184) at sun.reflect.GeneratedMethodAccessor381.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccesso"

    Spring JIRA | 3 years ago | ak
    org.springframework.batch.core.step.FatalStepExecutionException: JobRepository failure forcing exit with unknown status
  3. 0

    Using Confluence 4.3.2 and Dynamic task list 4.1.3. Dragging to re-order a task in a Dynamic Task List produces the following errors in the log: {quote} 2013-01-10 16:43:43,972 ERROR [TP-Processor2] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Deadlock found when trying to get lock; try restarting transaction -- url: /plugins/servlet/tasklist | userName: username | referer: https://... 2013-01-10 16:43:43,976 ERROR [TP-Processor2] [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session -- url: /plugins/servlet/tasklist | userName: username | referer: https://... 2013-01-10 16:43:43,981 ERROR [TP-Processor2] [ContainerBase.[Standalone].[localhost].[/]] log Unhandled exception occurred whilst decorating page -- url: /plugins/servlet/tasklist | userName: username | referer: https://... org.springframework.dao.ConcurrencyFailureException: Hibernate operation: could not update: [com.atlassian.confluence.pages.Page#75956371]; SQL []; Deadlock found when trying to get lock; try restarting transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:109) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.orm.hibernate.HibernateTransactionManager.convertJdbcAccessException(HibernateTransactionManager.java:619) at org.springframework.orm.hibernate.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:605) . . . Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction {quote} Verified in latest Chrome, Firefox, and IE8 and in an environment with no third-party plugins installed. h3.Steps to Reproduce # Create a page # Add a dynamic task list macro with no data, then save the page. # Add the following tasks into the task list: #* test #* test2 # Drag test so that it sits below test2, then drag test again so that it sits back up at the top of test2. You will notice the deadlock errors after doing that. h3.Fix This is no longer reproducible in Dynamic Tasklist 2 version 4.1.6 which is bundled with Confluence 5.0.1 and up

    Atlassian JIRA | 4 years ago | Kelli Carlson
    org.springframework.dao.ConcurrencyFailureException: Hibernate operation: could not update: [com.atlassian.confluence.pages.Page#75956371]; SQL []; Deadlock found when trying to get lock; try restarting transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HTTP Status 404 on /alfresco - heapoverflow.me

    heapoverflow.me | 5 months ago
    org.alfresco.error.AlfrescoRuntimeException: 02040119 Workflow deployment failed
  6. 0

    HTTP Status 404 on /alfresco

    Stack Overflow | 9 months ago | rg007
    org.alfresco.error.AlfrescoRuntimeException: 02040119 Workflow deployment failed

    Root Cause Analysis

    1. org.springframework.dao.ConcurrencyFailureException

      PreparedStatementCallback; SQL [UPDATE BATCH_STEP_EXECUTION_CONTEXT SET SHORT_CONTEXT = ?, SERIALIZED_CONTEXT = ? WHERE STEP_EXECUTION_ID = ?]; [Teradata Database] [TeraJDBC 14.00.00.37] [Error 2631] [SQLState 40001] Transaction ABORTed due to deadlock.; nested exception is com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 14.00.00.37] [Error 2631] [SQLState 40001] Transaction ABORTed due to deadlock.

      at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate()
    2. Spring Framework
      JdbcTemplate.update
      1. org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:110)
      2. org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
      3. org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
      4. org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
      5. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:605)
      6. org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:818)
      7. org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:874)
      7 frames
    3. Spring Batch Core
      SimpleJobRepository.updateExecutionContext
      1. org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.persistSerializedContext(JdbcExecutionContextDao.java:193)
      2. org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.updateExecutionContext(JdbcExecutionContextDao.java:136)
      3. org.springframework.batch.core.repository.support.SimpleJobRepository.updateExecutionContext(SimpleJobRepository.java:184)
      3 frames
    4. Java RT
      GeneratedMethodAccessor381.invoke
      1. sun.reflect.GeneratedMethodAccessor381.invoke(Unknown Source)
      1 frame