org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL exception: ]

Atlassian JIRA | Anton Shaleev [Atlassian] | 1 year ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    h3. Problem Definition Quartz is unable to recover from commit error (any - either transaction deadlock or WSREP cluster state failure) like this: {noformat} 2015-11-13 06:33:12,988 ERROR [scheduler_Worker-1] [org.quartz.core.ErrorLogger] schedulerError Unable to notify JobListener(s) of Job to be executed: (Job will NOT be executed!). trigger= DEFAULT.IndexQueu eFlusher job= DEFAULT.IndexQueueFlusher org.quartz.SchedulerException: JobListener 'ScheduledJobListener' threw exception: Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL e xception: [See nested exception: org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL exception: ] at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1951) at org.quartz.core.JobRunShell.notifyListenersBeginning(JobRunShell.java:364) at org.quartz.core.JobRunShell.run(JobRunShell.java:190) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool.lambda$runInThread$46(ConfluenceQuartzThreadPool.java:19) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$$Lambda$98/1862956413.run(Unknown Source) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL exception: at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:514) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701) at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at com.sun.proxy.$Proxy13.commit(Unknown Source) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy114.jobToBeExecuted(Unknown Source) at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1949) ... 5 more {noformat} After being 'unable to notify job listeners' it stops scheduling DEFAULT.IndexQueueFlusher task completely. h3. Suggested Solution It would be good if it will be possible to set up the scheduler to restart automatically or manually restart the job from Scheduled Jobs page. h3. Workaround Flush the index queue manually.

    Atlassian JIRA | 1 year ago | Anton Shaleev [Atlassian]
    org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL exception: ]
  2. 0

    h3. Problem Definition Quartz is unable to recover from commit error (any - either transaction deadlock or WSREP cluster state failure) like this: {noformat} 2015-11-13 06:33:12,988 ERROR [scheduler_Worker-1] [org.quartz.core.ErrorLogger] schedulerError Unable to notify JobListener(s) of Job to be executed: (Job will NOT be executed!). trigger= DEFAULT.IndexQueu eFlusher job= DEFAULT.IndexQueueFlusher org.quartz.SchedulerException: JobListener 'ScheduledJobListener' threw exception: Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL e xception: [See nested exception: org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL exception: ] at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1951) at org.quartz.core.JobRunShell.notifyListenersBeginning(JobRunShell.java:364) at org.quartz.core.JobRunShell.run(JobRunShell.java:190) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool.lambda$runInThread$46(ConfluenceQuartzThreadPool.java:19) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$$Lambda$98/1862956413.run(Unknown Source) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL exception: at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:514) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701) at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at com.sun.proxy.$Proxy13.commit(Unknown Source) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy114.jobToBeExecuted(Unknown Source) at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1949) ... 5 more {noformat} After being 'unable to notify job listeners' it stops scheduling DEFAULT.IndexQueueFlusher task completely. h3. Suggested Solution It would be good if it will be possible to set up the scheduler to restart automatically or manually restart the job from Scheduled Jobs page. h3. Workaround Flush the index queue manually.

    Atlassian JIRA | 1 year ago | Anton Shaleev [Atlassian]
    org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL exception: ]

    Root Cause Analysis

    1. org.springframework.transaction.TransactionSystemException

      Could not commit Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Commit failed with SQL exception: ]

      at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted()
    2. quartz
      JobRunShell.run
      1. org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1951)
      2. org.quartz.core.JobRunShell.notifyListenersBeginning(JobRunShell.java:364)
      3. org.quartz.core.JobRunShell.run(JobRunShell.java:190)
      3 frames
    3. com.atlassian.confluence
      ConfluenceQuartzThreadPool.lambda$runInThread$46
      1. com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool.lambda$runInThread$46(ConfluenceQuartzThreadPool.java:19)
      1 frame