Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67550

ClassNotFoundException when making any change in a Pipeline project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"
      Jenkins: 2.319.1

      Problem: Making any change in the UI for pipeline project, will lead to an exception:

      "...A problem occurred while processing the request..."

      The jenkins.log file complains with a ClassNotFoundException. Please see below, or in detail in the attached logs.

      Jenkins is up-and-running and serving all our build jobs, even the pipeline jobs. But we can't make any change via the Web/UI. Making manual changes in the filesystem and then reloading Jenkins works fine. Somehow we managed to break the UI, unfortunately we don't remember at what point.

      We have another Jenkins instance running, which serves pretty much the same jobs, and this runs without problem.

       Note: Jenkins is running behind an NGINX reverse proxy.

      2022-01-10 11:32:23.492+0000 [id=9] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving https://XXXX.net/job/gum-test2/configSubmit2022-01-10 11:32:23.492+0000 [id=9] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving https://jenkins.lane2.net/job/gum-test2/configSubmitjava.lang.ClassNotFoundException: cached miss for ["org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition","org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition"] at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2118)
       
      
      

       

      I also upgraded to a more recent version and I have confirmed that that class should be available in the filesystem:

       

      cd /var/lib/jenkins/plugins$
      jar -tvf workflow-cps/WEB-INF/lib/workflow-cps.jar  | grep org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.class
       10850 Fri Dec 17 08:14:36 UTC 2021 org/jenkinsci/plugins/workflow/cps/CpsScmFlowDefinition.class
      

      -> So the jar file and class exists.

      From the logs, it looks like a class loading problem. Any hint howto debug that step is really appreciated.

       

        1. jenkins.txt
          3 kB
          Martin Gutschelhofer
        2. stacktrace.txt
          21 kB
          Martin Gutschelhofer

            Unassigned Unassigned
            martgut Martin Gutschelhofer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: