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

Priority Sorter throws NullPointerException when update configuration

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When we tried to update Global Settings, we've got a crash and we found these stack in jenkins logs:

      mars 08, 2021 12:53:43 PM AVERTISSEMENT org.eclipse.jetty.server.handler.ContextHandler$Context logError while serving http://marketplace.jenkins.april.interne.fr/configSubmit
      java.lang.NullPointerException
      	at jenkins.advancedqueue.PrioritySorterConfiguration.updatePriorities(PrioritySorterConfiguration.java:179)
      	at jenkins.advancedqueue.PrioritySorterConfiguration.configure(PrioritySorterConfiguration.java:99)
      	at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:3847)
      	at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:3811)
      	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
      Caused: java.lang.reflect.InvocationTargetException
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:400)

      See full stacktrace in joined file...

        Attachments

          Activity

          jroyer Joël Royer created issue -
          jroyer Joël Royer made changes -
          Field Original Value New Value
          Summary Priority Sortir throws NullPointerException when update configuration Priority Sorter throws NullPointerException when update configuration
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Looks like the configuration got submitted without the priority strategy definition. Not sure what caused that...

          Could you please confirm that the Jenkins version is 2.249.3 and not the recent weekly?

          Show
          oleg_nenashev Oleg Nenashev added a comment - Looks like the configuration got submitted without the priority strategy definition. Not sure what caused that... Could you please confirm that the Jenkins version is 2.249.3 and not the recent weekly?
          Hide
          jroyer Joël Royer added a comment - - edited

          I confirm Jenkins version : 2.249.3.

          The error occurred right after installing the plugin. We were never able to change the settings.

           

          Show
          jroyer Joël Royer added a comment - - edited I confirm Jenkins version : 2.249.3. The error occurred right after installing the plugin. We were never able to change the settings.  
          Hide
          fr123k Frank Ittermann added a comment - - edited

          Can you provide the `jenkins.advancedqueue.PriorityConfiguration.xml` and `jenkins.advancedqueue.PrioritySorterConfiguration.xml` file content.

          It should be in your jenkins master home (JENKINS_HOME) directory.

          Show
          fr123k Frank Ittermann added a comment - - edited Can you provide the `jenkins.advancedqueue.PriorityConfiguration.xml` and `jenkins.advancedqueue.PrioritySorterConfiguration.xml` file content. It should be in your jenkins master home (JENKINS_HOME) directory.
          jroyer Joël Royer made changes -
          Hide
          jroyer Joël Royer added a comment -

          Files have been attached to this issue.

          Please note that we were forced to remove the plugin.

          Show
          jroyer Joël Royer added a comment - Files have been attached to this issue. Please note that we were forced to remove the plugin.
          Hide
          fr123k Frank Ittermann added a comment -

          There is an error in the provided `jenkins.advancedqueue.PriorityConfiguration.xml` file. 

          ...
          <priorityStrategies>        
            <jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder>          
              <id>0</id>        
          </jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder>      
          </priorityStrategies>
          ...

          It should more look like this.

          <priorityStrategies>        
            <jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder>          
              <id>0</id>          
              <priorityStrategy class="jenkins.advancedqueue.priority.strategy.UserIdCauseStrategy">            
                <priority>1</priority>          
              </priorityStrategy>
            </jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder>
          </priorityStrategies>

          The property `priorityStrategy` is missing and this cause a NullPointerException at Runtime.

          If you would add the missing property the plugin should work as expected.

          Show
          fr123k Frank Ittermann added a comment - There is an error in the provided `jenkins.advancedqueue.PriorityConfiguration.xml` file.  ... <priorityStrategies> <jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder> <id>0</id> </jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder> </priorityStrategies> ... It should more look like this. <priorityStrategies> <jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder> <id>0</id> <priorityStrategy class= "jenkins.advancedqueue.priority.strategy.UserIdCauseStrategy" > <priority>1</priority> </priorityStrategy> </jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder> </priorityStrategies> The property `priorityStrategy` is missing and this cause a NullPointerException at Runtime. If you would add the missing property the plugin should work as expected.
          Hide
          jroyer Joël Royer added a comment -

          Ok but those files were created as is by the plugin when we installed it.

          Show
          jroyer Joël Royer added a comment - Ok but those files were created as is by the plugin when we installed it.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jroyer Joël Royer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: