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

        Hide
        jundirl Jun-Dir Liew added a comment -
        Fixed by LDEV-2466
        Show
        jundirl Jun-Dir Liew added a comment - Fixed by LDEV-2466
        Hide
        ernieg Ernie Ghiglione added a comment -
        Show
        ernieg Ernie Ghiglione added a comment - See LDEV-2466
        Hide
        ernieg Ernie Ghiglione added a comment -
        Reopen as the status in JIRA shows as resolved instead of Close... re-closing in just a sec
        Show
        ernieg Ernie Ghiglione added a comment - Reopen as the status in JIRA shows as resolved instead of Close... re-closing in just a sec
        Hide
        ernieg Ernie Ghiglione added a comment -
        Done now
        Show
        ernieg Ernie Ghiglione added a comment - Done now

          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