Skip to content

Class missing java.lang.NoClassDefFoundError: org/gitlab4j/api/Constants$MergeRequestState #160

@wszychta

Description

@wszychta

Jenkins and plugins versions report

Environment
Jenkins: 2.504.3
OS: Linux - 6.8.0-53-generic
Java: 21.0.6 - Ubuntu (OpenJDK 64-Bit Server VM)
---
allure-jenkins-plugin:2.32.0
analysis-model-api:13.9.0-909.v97dd3a_07c53e
ansicolor:1.0.6
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
apache-httpcomponents-client-5-api:5.6-183.ve5a_8a_b_e71e59
asm-api:9.9.1-189.vb_5ef2964da_91
authentication-tokens:1.144.v5ff4a_5ec5c33
basic-branch-build-strategies:228.v68c089762a_db_
bootstrap5-api:5.3.8-890.v1c5cf4fa_178e
bouncycastle-api:2.30.1.82-277.v70ca_0b_877184
branch-api:2.1268.v044a_87612da_8
caffeine-api:3.2.3-194.v31a_b_f7a_b_5a_81
checks-api:402.vca_263b_f200e3
cloudbees-folder:6.1053.vd62fb_b_f7367b_
command-launcher:118.v72741845c17a_
commons-compress-api:1.28.0-2
commons-lang3-api:3.20.0-109.ve43756e2d2b_4
commons-text-api:1.15.0-210.v7480a_da_70b_9e
configuration-as-code:2006.v001a_2ca_6b_574
credentials:1480.v2246fd131e83
credentials-binding:702.vfe613e537e88
dashboard-view:2.528.v3470c02b_d7c9
data-tables-api:2.3.4-1400.vb_1e3e3c4dfc8
display-url-api:2.217.va_6b_de84cc74b_
docker-commons:457.v0f62a_94f11a_3
docker-workflow:611.v16e84da_6d3ff
dotnet-sdk:1.4.0
downstream-build-cache:1.7
durable-task:651.v1f5e074fc83f
echarts-api:6.0.0-1146.v5c8f3b_8f0573
eddsa-api:0.3.0.1-27.v6ea_07b_e90d1a_
font-awesome-api:7.0.1-859.v128d3a_efb_6e5
forensics-api:3.1754.v2a_6613b_77002
git:5.8.1
git-client:6.5.0
git-forensics:3.2.0
gitlab-api:6.2.0-111.vf174d6b_8c12e
gitlab-branch-source:718.v40b_5f0e67cd3
gitlab-oauth:1.21
gitlab-plugin:1.9.8
gson-api:2.13.2-173.va_a_092315913c
handy-uri-templates-2-api:2.1.8-36.v85e4cb_234a_13
http_request:1.20
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:94.vcc3065403257
jackson2-api:2.20.1-423.v13951f6b_6532
jakarta-activation-api:2.1.4-1
jakarta-mail-api:2.1.5-1
jakarta-xml-bind-api:4.0.5-3.v3d5b_a_73965b_9
javadoc:354.vee1a_660b_4990
javax-activation-api:1.2.0-8
javax-mail-api:1.6.2-11
jaxb:2.3.9-143.v5979df3304e6
jdk-tool:83.v417146707a_3d
jersey2-api:2.47-165.ve7809a_3e87e0
jersey3-api:3.1.11-4.v77818819c2e1
job-dsl:1.91
joda-time-api:2.14.0-177.vd7e9347b_e7d5
jquery:1.12.4-3
jquery3-api:3.7.1-594.vb_3864f326cf0
jsch:0.2.16-95.v3eecb_55fa_b_78
json-api:20251224-185.v0cc18490c62c
json-path-api:2.10.0-202.va_9cc16c1e476
jsoup:1.22.1-76.v9cdb_2456c0e3
junit:1369.v15da_00283f06
locale:566.v3323643741cc
lockable-resources:1349.v8b_ccb_c5487f7
mailer:525.v2458b_d8a_1a_71
matrix-auth:3.2.6
matrix-project:870.v9db_fcfc2f45b_
maven-plugin:3.27
metrics:4.2.37-494.v06f9a_939d33a_
mina-sshd-api-common:2.16.0-167.va_269f38cc024
mina-sshd-api-core:2.16.0-167.va_269f38cc024
monitoring:2.5.0
mstest:1.0.5
multibranch-build-strategy-extension:61.vf6d8f6f5ed02
okhttp-api:4.11.0-189.v976fa_d3379d6
oss-symbols-api:438.vcb_7a_29c179e0
parameterized-trigger:873.v8b_e37dd8418f
persistent-parameter:1.3
pipeline-build-step:584.vdb_a_2cc3a_d07a_
pipeline-graph-analysis:245.v88f03631a_b_21
pipeline-graph-view:430.v4cf821b_20632
pipeline-groovy-lib:787.ve2fef0efdca_6
pipeline-input-step:540.v14b_100d754dd
pipeline-milestone-step:138.v78ca_76831a_43
pipeline-model-api:2.2277.v00573e73ddf1
pipeline-model-definition:2.2277.v00573e73ddf1
pipeline-model-extensions:2.2277.v00573e73ddf1
pipeline-rest-api:2.39
pipeline-stage-step:322.vecffa_99f371c
pipeline-stage-tags-metadata:2.2277.v00573e73ddf1
pipeline-stage-view:2.37
pipeline-utility-steps:2.19.0
plain-credentials:199.v9f8e1f741799
plugin-util-api:6.1167.v022176c7e0ca_
prism-api:1.30.0-609.vf0a_df102d9a_f
rebuild:338.va_0a_b_50e29397
resource-disposer:0.25
role-strategy:756.v978cb_392eb_d3
scm-api:724.v7d839074eb_5c
script-security:1385.v7d2d9ec4d909
simple-theme-plugin:211.v5424a_5510e47
slack:761.v2a_8770f0d169
snakeyaml-api:2.5-143.v93b_c004f89de
ssh-agent:384.ve275343791a_6
ssh-credentials:361.vb_f6760818e8c
ssh-slaves:3.1031.v72c6b_883b_869
sshd:3.353.v2b_d33c46e970
structs:362.va_b_695ef4fdf9
timestamper:1.28
token-macro:477.vd4f0dc3cb_cf1
trilead-api:2.284.v1974ea_324382
uno-choice:2.8.6
variant:70.va_d9f17f859e0
view-job-filters:399.v6c89d5e6ff54
warnings-ng:12.5.0
workflow-aggregator:608.v67378e9d3db_1
workflow-api:1384.vdc05a_48f535f
workflow-basic-steps:1079.vce64b_a_929c5a_
workflow-cps:4252.v465f588eb_52f
workflow-durable-task-step:1458.va_2e10a_a_b_7c4d
workflow-job:1559.va_a_533730b_ea_d
workflow-multibranch:821.vc3b_4ea_780798
workflow-scm-step:466.va_d69e602552b_
workflow-step-api:710.v3e456cc85233
workflow-support:1010.vb_b_39488a_9841
ws-cleanup:0.48
xray-connector:2.6.1
yet-another-build-visualizer:1.17

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu 24.04

Reproduction steps

  1. Install all the plugins from the list above
  2. Create Jenkins Multipipeline project with Branch Source set to Gitlab Project
  3. Try to run Scan GitLab Project Now
  4. Observe bellow errors listed in Actual Results
  5. Replace plugin with version 5.8.1-106.vef1de800710e
  6. Retry Scan GitLab Project Now - it should work now

Expected Results

Gitlab Scanning is working as expected

Actual Results

Scanning not working with error in jenkins:

[Mon Feb 02 09:31:27 UTC 2026] Starting branch indexing...

Unable to detect if it is a mirror or not still fetching MRs anyway...
[Mon Feb 02 09:31:29 UTC 2026] Finished branch indexing. Indexing took 1.8 sec
Finished: NOT_BUILT

and another error in logs:

Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]: 2026-02-02 09:59:16.297+0000 [id=146]        SEVERE        hudson.model.Executor#finish1: Executor threw an exception
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]: java.lang.ClassNotFoundException: org.gitlab4j.api.Constants$MergeRequestState
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]: Caused: java.lang.NoClassDefFoundError: org/gitlab4j/api/Constants$MergeRequestState
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]:         at PluginClassLoader for gitlab-branch-source//io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.retrieve(GitLabSCMSource.java:351)
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]:         at PluginClassLoader for scm-api//jenkins.scm.api.SCMSource._retrieve(SCMSource.java:368)
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]:         at PluginClassLoader for scm-api//jenkins.scm.api.SCMSource.fetch(SCMSource.java:278)
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]:         at PluginClassLoader for branch-api//jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:693)
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]:         at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:272)
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]:         at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:170)
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]:         at PluginClassLoader for branch-api//jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1096)
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]:         at hudson.model.ResourceController.execute(ResourceController.java:101)
Feb 02 09:59:16 staging-jenkins-master jenkins[3145014]:         at hudson.model.Executor.run(Executor.java:446)

Anything else?

Going back to version 5.8.1-106.vef1de800710e fixes this issue.

Are you interested in contributing a fix?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions