Announcement Announcement Module
Collapse
No announcement yet.
Spring Batch Admin - Job fails with 'Can't Serialize access for this transaction' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Batch Admin - Job fails with 'Can't Serialize access for this transaction'

    I see from forum posting that this is as a result of running two jobs simultaneously
    http://forum.springsource.org/showth...ith-Oracle-11G

    Edit: Checked the document and the default transaction Isolation is 'Serializable'. Not sure what else needs to be configured.
    Code:
    The Job failed  org.springframework.dao.CannotSerializeTransactionException: PreparedStatementCallback; SQL [INSERT into BATCH_JOB_INSTANCE(JOB_INSTANCE_ID, JOB_NAME, JOB_KEY, VERSION) values (?, ?, ?, ?)]; ORA-08177: can't serialize access for this transaction
    ; nested exception is java.sql.SQLException: ORA-08177: can't serialize access for this transaction
    I checked the logs and I did not see any other job running/executed at that time.
    Also, I am not able to resubmit the Job with the same name once this error occurs.
    This is happening very frequently. Need help in preventing this from happening again.
    Thanks

    Edit: after another attempt, the Job Ran
    Last edited by [email protected]; Mar 21st, 2013, 06:20 AM. Reason: Adding more detail

  • #2
    I assume this is occurring on startup?

    Comment


    • sudhakar akepogu
      sudhakar akepogu commented
      Editing a comment
      We are getting this error on start up ... org.springframework.dao.CannotSerializeTransaction Exception: PreparedStatementCallback; SQL [INSERT into BATCH_JOB_INSTANCE(JOB_INSTANCE_ID, JOB_NAME, JOB_KEY, VERSION) values (?, ?, ?, ?)]; ORA-08177: can't serialize access for this transaction

  • #3
    It happened few times but not at the start up. We have configured 12 jobs but when the exception start happening, only a restart seems to be of help. Please note that the Job params are unique. Are there any other reasons other than mentioned in the link above?
    Thanks

    Comment


    • #4
      Hi,
      It happened again. I could not find a solution for this yet.
      Thanks

      Comment


      • #5
        If lowering the isolation level would help?

        Comment


        • #6
          How are you launching your jobs?

          Comment


          • sudhakar akepogu
            sudhakar akepogu commented
            Editing a comment
            We are using the Isolation level read committed in batch configuation. But we are getting this error.

            org.springframework.dao.CannotSerializeTransaction Exception: PreparedStatementCallback; SQL [INSERT into BATCH_JOB_INSTANCE(JOB_INSTANCE_ID, JOB_NAME, JOB_KEY, VERSION) values (?, ?, ?, ?)]; ORA-08177: can't serialize access for this transaction

            Please help us to resolve the issue.

        • #7
          Sudhakar,
          For me, it got resolved when I changed the 'isolation-level-for-create' to READ_COMMITTED for the Job Repository
          Refer section 4.3 in

          Comment

          Working...
          X