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

Unable to save Jenkins job with Node and Label Parameter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • Jenkins 2.431
      Node and Label parameter version 1.12.0

      I have upgraded my Jenkins version to 2.431 recently. I have a Jenkins job with Node Parameter which lets you choose a list of nodes a job needs to be run.

      When trying to save job I see the following error from Jenkins log

      Nov 16, 2023 2:36:25 PM WARNING hudson.init.impl.InstallUncaughtExceptionHandler handleExceptionCaught unhandled exception with ID a913c4ef-b66b-4b97-92f6-0408140dceeb
      java.lang.IllegalArgumentException: The frontend sent an unexpected list of classes (["org.jvnet.jenkins.plugins.nodelabelparameter.node.AllNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreOfflineNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreTempOfflineNodeEligibility"]) rather than an expected single class. See https://www.jenkins.io/doc/developer/views/table-to-div-migration/ for more information.
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:750)
      Caused: java.lang.IllegalArgumentException: Failed to instantiate class org.jvnet.jenkins.plugins.nodelabelparameter.node.NodeEligibility from {"stapler-class":["org.jvnet.jenkins.plugins.nodelabelparameter.node.AllNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreOfflineNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreTempOfflineNodeEligibility"],"$class":["org.jvnet.jenkins.plugins.nodelabelparameter.node.AllNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreOfflineNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreTempOfflineNodeEligibility"]}
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:771)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:551)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:877)
      Caused: java.lang.IllegalArgumentException: Failed to convert the nodeEligibility parameter of the constructor public org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterDefinition(java.lang.String,java.lang.String,java.util.List,java.util.List,java.lang.String,org.jvnet.jenkins.plugins.nodelabelparameter.node.NodeEligibility)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:879)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:768)
      Caused: java.lang.IllegalArgumentException: Failed to instantiate class org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterDefinition from {"stapler-class":"org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterDefinition","$class":"org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterDefinition","name":"NODE_NAME","defaultSlaves":["10kdfu_ios2"],"allowedSlaves":["10kdfu_android1","10kdfu_android2","10kdfu_android3"],"triggerIfResult":"allowMultiSelectionForConcurrentBuilds","":"0","nodeEligibility":{"stapler-class<span class="code-quote">":["org.jvnet.jenkins.plugins.nodelabelparameter.node.AllNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreOfflineNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreTempOfflineNodeEligibility"],"$class<span class="code-quote">":["org.jvnet.jenkins.plugins.nodelabelparameter.node.AllNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreOfflineNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreTempOfflineNodeEligibility"]},"description":"Nodes"}
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:771)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:551)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:546)
      	at hudson.model.Descriptor.bindJSON(Descriptor.java:623)
      	at hudson.model.Descriptor.newInstance(Descriptor.java:593)
      Caused: java.lang.LinkageError: Failed to instantiate class org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterDefinition from {"stapler-class":"org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterDefinition","$class":"org.jvnet.jenkins.plugins.nodelabelparameter.NodeParameterDefinition","name":"NODE_NAME","defaultSlaves":["10kdfu_ios2"],"allowedSlaves":["10kdfu_android1","10kdfu_android2","10kdfu_android3"],"triggerIfResult":"allowMultiSelectionForConcurrentBuilds","":"0","nodeEligibility":{"stapler-class<span class="code-quote">":["org.jvnet.jenkins.plugins.nodelabelparameter.node.AllNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreOfflineNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreTempOfflineNodeEligibility"],"$class<span class="code-quote">":["org.jvnet.jenkins.plugins.nodelabelparameter.node.AllNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreOfflineNodeEligibility","org.jvnet.jenkins.plugins.nodelabelparameter.node.IgnoreTempOfflineNodeEligibility"]},"description":"Nodes"}
      	at hudson.model.Descriptor.newInstance(Descriptor.java:596)
      	at hudson.model.Descriptor$NewInstanceBindInterceptor.instantiate(Descriptor.java:670)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:855)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:768)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:818)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:551)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:877)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:768)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:551)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:546)
      	at hudson.model.Descriptor.bindJSON(Descriptor.java:623)
      	at hudson.model.Descriptor.newInstance(Descriptor.java:593)
      	at hudson.model.JobPropertyDescriptor.newInstance(JobPropertyDescriptor.java:69)
      	at jenkins.model.OptionalJobProperty$OptionalJobPropertyDescriptor.newInstance(OptionalJobProperty.java:56)
      	at hudson.model.ParametersDefinitionProperty$DescriptorImpl.newInstance(ParametersDefinitionProperty.java:236)
      	at hudson.model.ParametersDefinitionProperty$DescriptorImpl.newInstance(ParametersDefinitionProperty.java:231)
      	at hudson.model.JobProperty.reconfigure(JobProperty.java:188)
      	at hudson.model.JobProperty.reconfigure(JobProperty.java:78)
      	at hudson.util.DescribableList.rebuild(DescribableList.java:181)
      	at hudson.model.Job.doConfigSubmit(Job.java:1336)
      	at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:775)
      	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:207)
      	at org.kohsuke.stapler.SelectionInterceptedFunction$Adapter.invoke(SelectionInterceptedFunction.java:36)
      	at org.kohsuke.stapler.verb.HttpVerbInterceptor.invoke(HttpVerbInterceptor.java:48)
      	at org.kohsuke.stapler.SelectionInterceptedFunction.bindAndInvoke(SelectionInterceptedFunction.java:26)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:140)
      	at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:558)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:59)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:770)
      Caused: javax.servlet.ServletException
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:818)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:900)
      	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:289)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:59)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:770)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:900)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:698)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:248)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
      	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:163)
      	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
      	at jenkins.util.HttpServletFilter$1.doFilter(HttpServletFilter.java:76)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:166)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at jenkins.ErrorAttributeFilter.doFilter(ErrorAttributeFilter.java:29)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:154)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:94)
      	at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:54)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:110)
      	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:101)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:97)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117)
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:63)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:111)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:172)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:53)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:569)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      	at org.eclipse.jetty.server.Server.handle(Server.java:563)
      	at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)
      	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
      	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:199)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
      	at java.base/java.lang.Thread.run(Thread.java:829) 

            Unassigned Unassigned
            vamaring VAMSHI
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: