Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-1973

Inserting a user response results in duplicate entry error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.4, 2.3.3
    • Component/s: Tool QA
    • Labels:
      None

      Description

      Ran into this when running some tests with the test harness. I ran a sequence with a QA tool with default content, 5 learners, and a min/max delay of 1 and 3 seconds. In about half of the tests, one (sometimes two) learners would abort with the following error (not id-specific):

      org.springframework.dao.DataIntegrityViolationException: Hibernate transaction synchronization: Could not execute JDBC batch update; SQL [insert into tl_laqa11_usr_resp (answer, hidden, attempt_time, visible, time_zone, qa_que_content_id, que_usr_id, response_id) values (?, ?, ?, ?, ?, ?, ?, ?)]; Duplicate entry '27' for key 1; nested exception is java.sql.BatchUpdateException: Duplicate entry '27' for key 1
      java.sql.BatchUpdateException: Duplicate entry '27' for key 1

      Primary keys should ideally be left to hibernate - to investigate whether this can be made smarter.

        Activity

        jundirl Jun-Dir Liew created issue -
        ernieg Ernie Ghiglione made changes -
        Field Original Value New Value
        Fix Version/s 2.4 [ 10110 ]
        Fix Version/s 2.3 [ 10090 ]
        jundirl Jun-Dir Liew made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.3.3 [ 10141 ]
        Resolution Fixed [ 1 ]
        ernieg Ernie Ghiglione made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        ernieg Ernie Ghiglione made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        ernieg Ernie Ghiglione made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            ernieg Ernie Ghiglione
            Reporter:
            jundirl Jun-Dir Liew
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development