Skip to content

Commit

Permalink
[JENKINS-73119] Catch the class not found exception (#26)
Browse files Browse the repository at this point in the history
If the folders plugin is not installed, jobs fail to start and report:
"Exception evaluating if the gueue can run the task"

Once the class not found exception is caught, then the job runs as expected.

Confirmed the failure by running Jenkins 2.426.3 with the build blocker
plugin 165.v5ecb_fb_f61520 installed.  I created a freestyle job and
ran it.  The run failed with the message "Exception evaluating if the
gueue can run the task".

Confirmed the failure is resolved by installing the build of this commit
and ran the same job without error.  Confirmed that the class not found
exception was written to the Jenkins logger when I enabled FINE logging
for the BuildBlockerQueueTaskDispatcher.  FINE logging is disabled by
default, so the Jenkins log will not be cluttered by those exception
messages unless an administrator specifically enables it.
  • Loading branch information
MarkEWaite authored May 19, 2024
1 parent 5ecbfbf commit c82fc20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ private IBuildBlockerProperty getBuildBlockerProperty(Queue.Item item) {
return property;
}
}
catch (Exception e) {
catch (NoClassDefFoundError | Exception e) {
LOG.logp(FINE, getClass().getName(), "getBuildBlockerProperty", "Unable to check parent for build blocker property. Make sure cloudbees-folder plugin is installed.", e);
}

Expand Down

0 comments on commit c82fc20

Please sign in to comment.