JITL - JobScheduler Integrated Template Library
  1. JITL - JobScheduler Integrated Template Library
  2. JITL-549

Plugin throws error "duplicate key value violates unique constraint "scheduler_mn_uniq"

    Details

    • Type: Fix Fix
    • Status: Released (View Workflow)
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.12.8
    • Fix Version/s: 1.12.9
    • Labels:
      None

      Description

      Current Situation

      • The FactNotification Plugin throws the following error:
        .22 01:01:55.534 com.sos.jitl.reporting.plugin.FactNotificationPlugin [ERROR] - process: java.lang.Exception: process: com.sos.hibernate.exceptions.SOSHibernateObjectOperationException: could not execute statement: 0 ERROR: duplicate key value violates unique constraint "scheduler_mn_uniq"
          Detail: Key ("SCHEDULER_ID", "ORDER_HISTORY_ID", "STEP", "TASK_ID", "STANDALONE")=(SOSJS1, 106448, 1, 157264, 0) already exists. [n/a] 
        
      • This error can occur if the com.sos.jitl.notification.jobs.result.StoreResultsJobJSAdapterClass monitor is activated.

      Desired Behavior

      • The FactNotification Plugin should not throw errors.

      Test Instruction

      • unzip JITL-549.zip to any location
      • define global monitor in the $scheduler_data/config/scheduler.xml
        • add content of the JITL-549/config/scheduler.xml <plugin java_class="com.sos.scheduler.plugins.globalmonitor.GlobalMonitorPlugin"> to your scheduler.xml configuration
        • adjust <param name="configuration_directory" value="..." />
      • copy JITL-549/config/live/global_notification_store_results.monitor.xml to $scheduler_data/config/live
      • adjust $scheduler_data/config/notification/SystemMonitorNotification_MonitorSystem.xml to notify all job chains
        • see example
      • restart the JobScheduler
      • run some job chains and check the scheduler.log for the "duplicate key" exception

      Applicable JobScheduler Releases
      A patch is available for download with JobScheduler releases:

      • JobScheduler 1.12.7
      • JobScheduler 1.12.8

        Activity

        Hide
        Kanika Agrawal added a comment -

        The issue is working as expected. The FactPlugin does not throw "Duplicate key" error.

        • Tested with JobScheduler release date 2019-04-09.
        Show
        Kanika Agrawal added a comment - The issue is working as expected. The FactPlugin does not throw "Duplicate key" error. Tested with JobScheduler release date 2019-04-09.

          People

          • Assignee:
            Robert Ehrlich
            Reporter:
            Mahendra Patidar
            Approver:
            Kanika Agrawal
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: