Uploaded image for project: '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"

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.12.8
    • 1.12.9
    • 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

      Attachments

        Activity

          People

            re Robert Ehrlich
            mp Mahendra Patidar
            Kanika Agrawal Kanika Agrawal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: