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

Unable to store any configuration with priority sorter plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • prioritysorter-plugin
    • 4.0.1 released Nov 27, 2021

      Whenever I am trying to save a configuration (job, plugin, etc.), jenkins tells me an oopsie.

      I attached example logs. In the end it always tells me something like:

      Caused: java.lang.IllegalArgumentException: Class [<A Bunch of classes here>] is specified in JSON, but no such class found in classLoader hudson.PluginManager$UberClassLoader.

      I tried upgrading/downgrading several plugins, but in the end it doesn't matter. As soon as I press a save/apply button the error appears and my changes do not take effect.

        1. advanced-build-queue.log
          11 kB
        2. jenkins_save_job.log
          13 kB
        3. plugins.txt
          3 kB
        4. README
          0.6 kB

          [JENKINS-67218] Unable to store any configuration with priority sorter plugin

          Norman Specht added a comment -

          Sorry I don't know what exactly I have to send you in order to reproduce the error. Its a debian linux with plenty of RAM and CPU power, only having jenkins running on it.

          All I can tell you the advanced-build-queue.log is taken when I try to configure exactly this plugin (advanced-build-queue).

          I took the other log by just opening the configuration of a multi-branch-pipeline job and just hit apply, but also appears when I try to configure a normal job.

          If you need more details, let me know what I should provide you.

           

          I don't think it's a duplicate of JENKINS-67109, as the bug appears also on other configuration steps and plugins and does also appear on 2.321.

          I also upgraded to 2.322, the bug still does appear making 2.319 the latest version I can use.

          Norman Specht added a comment - Sorry I don't know what exactly I have to send you in order to reproduce the error. Its a debian linux with plenty of RAM and CPU power, only having jenkins running on it. All I can tell you the advanced-build-queue.log is taken when I try to configure exactly this plugin (advanced-build-queue). I took the other log by just opening the configuration of a multi-branch-pipeline job and just hit apply, but also appears when I try to configure a normal job. If you need more details, let me know what I should provide you.   I don't think it's a duplicate of JENKINS-67109 , as the bug appears also on other configuration steps and plugins and does also appear on 2.321. I also upgraded to 2.322, the bug still does appear making 2.319 the latest version I can use.

          Mark Waite added a comment -

          I can't find a plugin named "advanced-build-queue". It is not mentioned in your list of plugins and does not appear on the Jenkins plugins site. Possibly that is a custom plugin that has been built locally?

          If that is a locally built plugin, you may want to check to see if it is the root of the issues. Remove that plugin from a test installation of Jenkins and see if the problem is resolved.

          Mark Waite added a comment - I can't find a plugin named "advanced-build-queue". It is not mentioned in your list of plugins and does not appear on the Jenkins plugins site. Possibly that is a custom plugin that has been built locally? If that is a locally built plugin, you may want to check to see if it is the root of the issues. Remove that plugin from a test installation of Jenkins and see if the problem is resolved.

          Norman Specht added a comment -

          Sorry, its the Priority Sorter Plugin

          Norman Specht added a comment - Sorry, its the  Priority Sorter Plugin

          Mark Waite added a comment - - edited

          I can see a problem but I'm not sure if the problem is with the priority sorter plugin or with Jenkins core. I'm also not 100% confident that the problem I see is the same as the problem you see.

          Steps I took:

          1. Download plugins.txt into an empty local directory
          2. Download README into the same directory
          3. Execute the README file with
            bash ./README
          4. Open a web browser to the Jenkins instance running that script (in my case it was http://testing-a.markwaite.net:8080/)
          5. Use the newly displayed admin password to login, then choose to install no additional plugins and define your own username and password
          6. Login with that username and password
          7. Create two folders in Jenkins, one named "High Priority Jobs" and the other named "Low Priority Jobs"
          8. Open "Job Priorities" and define 3 priority settings, priority 1 for all jobs in the "High Priority Jobs" folder, priority 5 for all jobs in the "Low Priority Jobs" folder, and priority 3 for all jobs
          9. Save the priority definition and sometimes I get a stack trace in the Jenkins console window and an exception on the web page. The stack trace looks like this:
          2021-11-24 19:41:46.026+0000 [id=19]    WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://testing-a.markwaite.net:8080/advanced-build-queue/priorityConfigSubmit
          java.lang.ClassNotFoundException: ["jenkins.advancedqueue.jobinclusion.strategy.AllJobsJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.PropertyBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.FolderBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy"]
                  at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2196)
                  at java.base/java.util.Optional.orElseThrow(Optional.java:408)
                  at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2196)
                  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
                  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
                  at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)
          Caused: java.lang.IllegalArgumentException: Class ["jenkins.advancedqueue.jobinclusion.strategy.AllJobsJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.PropertyBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.FolderBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy"] is specified in JSON, but no such class found in classLoader hudson.PluginManager$UberClassLoader
                  at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:686)
          Caused: java.lang.IllegalArgumentException: Failed to instantiate class jenkins.advancedqueue.jobinclusion.JobInclusionStrategy from {"stapler-class":["jenkins.advancedqueue.jobinclusion.strategy.AllJobsJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.PropertyBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.FolderBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy"],"$class":["jenkins.advancedqueue.jobinclusion.strategy.AllJobsJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.PropertyBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.FolderBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy"]}
                  at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:693)
                  at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:490)
                  at jenkins.advancedqueue.JobGroup.newInstance(JobGroup.java:210)
                  at jenkins.advancedqueue.PriorityConfiguration.doPriorityConfigSubmit(PriorityConfiguration.java:181)
                  at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
                  at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:393)
          Caused: java.lang.reflect.InvocationTargetException
                  at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
                  at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:405)
          

          Mark Waite added a comment - - edited I can see a problem but I'm not sure if the problem is with the priority sorter plugin or with Jenkins core. I'm also not 100% confident that the problem I see is the same as the problem you see. Steps I took: Download plugins.txt into an empty local directory Download README into the same directory Execute the README file with bash ./README Open a web browser to the Jenkins instance running that script (in my case it was http://testing-a.markwaite.net:8080/ ) Use the newly displayed admin password to login, then choose to install no additional plugins and define your own username and password Login with that username and password Create two folders in Jenkins, one named "High Priority Jobs" and the other named "Low Priority Jobs" Open "Job Priorities" and define 3 priority settings, priority 1 for all jobs in the "High Priority Jobs" folder, priority 5 for all jobs in the "Low Priority Jobs" folder, and priority 3 for all jobs Save the priority definition and sometimes I get a stack trace in the Jenkins console window and an exception on the web page. The stack trace looks like this: 2021-11-24 19:41:46.026+0000 [id=19] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://testing-a.markwaite.net:8080/advanced-build-queue/priorityConfigSubmit java.lang.ClassNotFoundException: ["jenkins.advancedqueue.jobinclusion.strategy.AllJobsJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.PropertyBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.FolderBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy"] at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2196) at java.base/java.util.Optional.orElseThrow(Optional.java:408) at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2196) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681) Caused: java.lang.IllegalArgumentException: Class ["jenkins.advancedqueue.jobinclusion.strategy.AllJobsJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.PropertyBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.FolderBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy"] is specified in JSON, but no such class found in classLoader hudson.PluginManager$UberClassLoader at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:686) Caused: java.lang.IllegalArgumentException: Failed to instantiate class jenkins.advancedqueue.jobinclusion.JobInclusionStrategy from {"stapler-class":["jenkins.advancedqueue.jobinclusion.strategy.AllJobsJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.PropertyBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.FolderBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy"],"$class":["jenkins.advancedqueue.jobinclusion.strategy.AllJobsJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.PropertyBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.FolderBasedJobInclusionStrategy","jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy"]} at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:693) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:490) at jenkins.advancedqueue.JobGroup.newInstance(JobGroup.java:210) at jenkins.advancedqueue.PriorityConfiguration.doPriorityConfigSubmit(PriorityConfiguration.java:181) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:393) Caused: java.lang.reflect.InvocationTargetException at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:405)

          Mark Waite added a comment - - edited

          I see the same failure with Jenkins 2.319.1-rc as I see with 2.322.

          I see the same failure with Jenkins 2.303.3 as I see with Jenkins 2.322.

          I assume the problem that I am seeing is specific to the priority sorter plugin and its configuration page.

          vralfy your description indicates that saving individual jobs also fails. I'm not seeing that. I'm also not seeing a failure that is specific to a newer Jenkins version. The failure I see is happening with Jenkins 2.303.3, Jenkins 2.320, and Jenkins 3.322. Sometimes I need to enter the "Job Priorities" page twice before the exception is displayed, but it is consistently visible at least half of all page saves.

          The stack trace I see matches with the stack trace provided from vralfy in advanced-build-queue.log

          Mark Waite added a comment - - edited I see the same failure with Jenkins 2.319.1-rc as I see with 2.322. I see the same failure with Jenkins 2.303.3 as I see with Jenkins 2.322. I assume the problem that I am seeing is specific to the priority sorter plugin and its configuration page. vralfy your description indicates that saving individual jobs also fails. I'm not seeing that. I'm also not seeing a failure that is specific to a newer Jenkins version. The failure I see is happening with Jenkins 2.303.3, Jenkins 2.320, and Jenkins 3.322. Sometimes I need to enter the "Job Priorities" page twice before the exception is displayed, but it is consistently visible at least half of all page saves. The stack trace I see matches with the stack trace provided from vralfy in advanced-build-queue.log

          Tim Jacomb added a comment -

          Sounds like a tables to div bug.

          For the record acceptance tests are passing with this plugin:
          https://github.com/jenkinsci/acceptance-test-harness/blob/master/src/test/java/plugins/PrioritySorterPluginTest.java

          Tim Jacomb added a comment - Sounds like a tables to div bug. For the record acceptance tests are passing with this plugin: https://github.com/jenkinsci/acceptance-test-harness/blob/master/src/test/java/plugins/PrioritySorterPluginTest.java

          Mark Waite added a comment - - edited

          Thanks for the pointer to tables to divs timja. Per https://issues.jenkins.io/browse/JENKINS-65859, the plugin has not been updated to support configuration form modernization.

          However, I see that the 4.0.0 release includes JENKINS-64694 as a fix for tables to divs issues. May indicate that there are additional tables to divs issues that need to be handled in the plugin.

          Deeper analysis of the problem is reported in JENKINS-66938

          Mark Waite added a comment - - edited Thanks for the pointer to tables to divs timja . Per https://issues.jenkins.io/browse/JENKINS-65859 , the plugin has not been updated to support configuration form modernization. However, I see that the 4.0.0 release includes JENKINS-64694 as a fix for tables to divs issues. May indicate that there are additional tables to divs issues that need to be handled in the plugin. Deeper analysis of the problem is reported in JENKINS-66938

          Tim Jacomb added a comment -

          Yeah looks like a duplicate of that issue

          Tim Jacomb added a comment - Yeah looks like a duplicate of that issue

          Mark Waite added a comment -

          https://ci.jenkins.io/job/Plugins/job/priority-sorter-plugin/job/PR-88/ provides a prototype of the proposed fix. I'm not comfortable that the proposed fix will resolve the issue in all cases. I'd love to have others review it interactively and through the code.

          Mark Waite added a comment - https://ci.jenkins.io/job/Plugins/job/priority-sorter-plugin/job/PR-88/ provides a prototype of the proposed fix. I'm not comfortable that the proposed fix will resolve the issue in all cases. I'd love to have others review it interactively and through the code.

          Mark Waite added a comment -

          Released 4.0.1 with the changes to fix this. Let me know if issues are detected with the fix.

          Mark Waite added a comment - Released 4.0.1 with the changes to fix this. Let me know if issues are detected with the fix.

            markewaite Mark Waite
            vralfy Norman Specht
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: