BSA: Windows Patch Analysis Job error: Failed to create job workitems, Error: Missing expected job run for job id : xxxxx

Version 1

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    BladeLogic Server Automation Suite


    BMC BladeLogic Server Automation Suite



    Windows Patching Job fails with the following error message:

    No job run found for job id: xxxxx Failed to create job workitems, Error: Missing expected job run for job id : xxxxx  com.bladelogic.mfw.util.BlException: Missing expected job run for job id : xxxxx      at com.bladelogic.model.job.jobrun.JobRunServiceImpl.findLastRunByJobId(      at com.bladelogic.model.job.jobrun.JobRunServiceImpl.findLastRunByJobId(      at com.bladelogic.model.job.compliance.patch.analysis.AsyncPatchAnalysisJobExecutor.startJobExecution(      at      at com.bladelogic.model.job.compliance.patch.analysis.AsyncPatchAnalysisJobExecutor.processEvent(      at      at      at      at





    Legacy ID:KA356114


    The error message relates to the last job run id of the Catalog that is used by the failing Patching Job.
    When the Patching Job is executed, it will first validate that the Catalog , and it does it by checking the last catalog job run. If the Catalog job run was deleted, then the Patching Job fails with the error message.


    To resolve the issue immediately, rerun the Catalog Update Job.


    One cause of the missing CUJ run is that the run(s) were most likely deleted by the cleanup job where the retention policy for the Catalog Job runs was low, forcing the latest runs to be deleted along with the old runs.  If you run Catalog Update Job once a month for example, then set the RESULTS_RETENTION_TIME in Catalog Update Job Properties to maybe 100 (~3 months). This ensures that the last job run will be present after cleanup, and the Patch Analysis Job will not fail in the same fashion. Basically the retention time should be higher than how many days pass between the cleanup runs.


    Article Number:


    Article Type:

    Solutions to a Product Problem

      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles