Jump to content
We've recently updated our Privacy Statement, available here ×
  • Hibernate Optimistic Locking error when running many jobs at the same time


    Jim W
    • Features: Scheduler Version: v7.1 Product: JasperReports® Server

    Description:

    You are getting the following Hibernate Optimistic Locking error when running many jobs at the same time

    [toc]
    org.quartz.JobExecutionException: The job was not completed. A system error occurred while running it. [See nested exception: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.jaspersoft.jasperserver.api.engine.scheduling.hibernate.PersistentReportJobAlert] with identifier [2241]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.jaspersoft.jasperserver.api.engine.scheduling.hibernate.PersistentReportJobAlert#2241]]
    at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.throwJobExecutionException(ReportExecutionJob.java:416)
    at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.checkExceptions(ReportExecutionJob.java:408)
    at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:644)
    at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:279)
    at com.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.execute(ReportOptionsExecutionJob.java:47)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
    Caused by: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.jaspersoft.jasperserver.api.engine.scheduling.hibernate.PersistentReportJobAlert] with identifier [2241]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.jaspersoft.jasperserver.api.engine.scheduling.hibernate.PersistentReportJobAlert#2241]
    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:683)

    Resolution:

    Try adding these properties to WEB-INF/js.quartz.base.properties and set them to "true"

    org.quartz.jobStore.txIsolationLevelSerializable
    org.quartz.jobStore.acquireTriggersWithinLock
    
    

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...