Uploaded image for project: 'JITL - JobScheduler Integrated Template Library'
  1. JITL - JobScheduler Integrated Template Library
  2. JITL-514

The CheckHistory Job does not get a valid access token

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.12.7
    • 1.12.8
    • None

    Description

      Current Situation

      When starting the checkHistory Job, no valid access token is available and the job fails with a stacktrace

      java.lang.Exception: AccessToken is empty. Login not executed 
       	at com.sos.jitl.checkhistory.classes.HistoryWebserviceExecuter.getJobChainHistoryEntry(HistoryWebserviceExecuter.java:172) 
       	at com.sos.jitl.checkhistory.classes.HistoryWebserviceExecuter.getLastCompletedSuccessfullJobChainHistoryEntry(HistoryWebserviceExecuter.java:227) 
       	at com.sos.jitl.checkhistory.JobChainHistory.getHistoryByWebServiceCall(JobChainHistory.java:218) 
       	at com.sos.jitl.checkhistory.JobChainHistory.jobSchedulerHistoryInfo(JobChainHistory.java:92) 
       	at com.sos.jitl.checkhistory.JobChainHistory.getJobSchedulerHistoryInfo(JobChainHistory.java:66) 
       	at com.sos.jitl.checkhistory.JobSchedulerCheckHistory.Execute(JobSchedulerCheckHistory.java:150) 
       	at com.sos.jitl.checkhistory.JobSchedulerCheckHistoryJSAdapterClass.doProcessing(JobSchedulerCheckHistoryJSAdapterClass.java:30) 
      

      Desired Behavior

      The checkHistory Job should run without exception

      Testcase

      To test the issue start this job

      <?xml version="1.0" encoding="ISO-8859-1"?>
      
      
      <job  title="Check the last job run" stop_on_error="no">
          <params >
              <param  name="job_name" value="job1"/>
              <param  name="query" value="isStartedToday"/>
          </params>
      
          <script  language="java" java_class="com.sos.jitl.checkhistory.JobSchedulerCheckHistoryJSAdapterClass"/>
      
          <monitor  name="apiAccessToken" ordering="0">
              <script  language="java" java_class="com.sos.jitl.restclient.CreateApiAccessToken"/>
          </monitor>
      
          <run_time />
      </job>
      

      Patch

      A patch is available here.

      • Download and extract the zip file
      • Stop JobScheduler
      • Copy the jar file to $scheduler_home/lib/patches
      • Start JobScheduler

      Attachments

        Activity

          People

            ur Uwe Risse
            ur Uwe Risse
            Alan Amos Alan Amos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: