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

Upgraded to 2.479.1, can't create a new job from within a sectioned view

      If a sectioned view is the current view in Jenkins 2.475 or later, then a new job cannot be created from that view. A new job can be created if another view is active, but cannot be created when the current view is a sectioned view.

      JDK version: 21.0.2

      Error log:

       java.lang.NoSuchMethodError: 'hudson.model.TopLevelItem hudson.model.Hudson.doCreateItem(org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse)'
      	at PluginClassLoader for sectioned-view//hudson.plugins.sectioned_view.SectionedView.doCreateItem(SectionedView.java:183)
      	at hudson.model.View.doCreateItem(View.java:797)
      	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:484)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:497)
      	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:79)
      	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:218)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:140)
      	at org.kohsuke.stapler.MetaClass$12.doDispatch(MetaClass.java:686)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:61)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:800)
      Caused: jakarta.servlet.ServletException
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:851)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:938)
      	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:369)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:61)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:800)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:938)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:721)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:253)
      	at Jenkins Main ClassLoader//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:587)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHolder.handle(ServletHolder.java:765)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1668)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:204)
      	at io.jenkins.servlet.FilterChainWrapper$2.doFilter(FilterChainWrapper.java:53)
      Caused: javax.servlet.ServletException
      	at io.jenkins.servlet.ServletExceptionWrapper.fromJakartaServletException(ServletExceptionWrapper.java:14)
      	at io.jenkins.servlet.FilterChainWrapper$2.doFilter(FilterChainWrapper.java:62)
      	at PluginClassLoader for sse-gateway//org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:248)
      	at io.jenkins.servlet.FilterWrapper$1.doFilter(FilterWrapper.java:42)
      Caused: jakarta.servlet.ServletException
      	at io.jenkins.servlet.ServletExceptionWrapper.toJakartaServletException(ServletExceptionWrapper.java:9)
      	at io.jenkins.servlet.FilterWrapper$1.doFilter(FilterWrapper.java:53)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:201)
      	at io.jenkins.servlet.FilterChainWrapper$2.doFilter(FilterChainWrapper.java:53)
      Caused: javax.servlet.ServletException
      	at io.jenkins.servlet.ServletExceptionWrapper.fromJakartaServletException(ServletExceptionWrapper.java:14)
      	at io.jenkins.servlet.FilterChainWrapper$2.doFilter(FilterChainWrapper.java:62)
      	at PluginClassLoader for blueocean-web//io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
      	at io.jenkins.servlet.FilterWrapper$1.doFilter(FilterWrapper.java:42)
      Caused: jakarta.servlet.ServletException
      	at io.jenkins.servlet.ServletExceptionWrapper.toJakartaServletException(ServletExceptionWrapper.java:9)
      	at io.jenkins.servlet.FilterWrapper$1.doFilter(FilterWrapper.java:53)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:201)
      	at io.jenkins.servlet.FilterChainWrapper$2.doFilter(FilterChainWrapper.java:53)
      Caused: javax.servlet.ServletException
      	at io.jenkins.servlet.ServletExceptionWrapper.fromJakartaServletException(ServletExceptionWrapper.java:14)
      	at io.jenkins.servlet.FilterChainWrapper$2.doFilter(FilterChainWrapper.java:62)
      	at PluginClassLoader for blueocean-jwt//io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:60)
      	at io.jenkins.servlet.FilterWrapper$1.doFilter(FilterWrapper.java:42)
      Caused: jakarta.servlet.ServletException
      	at io.jenkins.servlet.ServletExceptionWrapper.toJakartaServletException(ServletExceptionWrapper.java:9)
      	at io.jenkins.servlet.FilterWrapper$1.doFilter(FilterWrapper.java:53)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:201)
      	at io.jenkins.servlet.FilterChainWrapper$2.doFilter(FilterChainWrapper.java:53)
      Caused: javax.servlet.ServletException
      	at io.jenkins.servlet.ServletExceptionWrapper.fromJakartaServletException(ServletExceptionWrapper.java:14)
      	at io.jenkins.servlet.FilterChainWrapper$2.doFilter(FilterChainWrapper.java:62)
      	at PluginClassLoader for metrics//jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      	at io.jenkins.servlet.FilterWrapper$1.doFilter(FilterWrapper.java:42)
      Caused: jakarta.servlet.ServletException
      	at io.jenkins.servlet.ServletExceptionWrapper.toJakartaServletException(ServletExceptionWrapper.java:9)
      	at io.jenkins.servlet.FilterWrapper$1.doFilter(FilterWrapper.java:53)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:201)
      	at jenkins.util.HttpServletFilter$1.doFilter(HttpServletFilter.java:77)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:201)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:207)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1638)
      	at jenkins.ErrorAttributeFilter.doFilter(ErrorAttributeFilter.java:29)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1638)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:154)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1638)
      	at hudson.security.ChainedServletFilter2$1.doFilter(ChainedServletFilter2.java:94)
      	at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52)
      	at hudson.security.ChainedServletFilter2$1.doFilter(ChainedServletFilter2.java:99)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:54)
      	at hudson.security.ChainedServletFilter2$1.doFilter(ChainedServletFilter2.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.ChainedServletFilter2$1.doFilter(ChainedServletFilter2.java:99)
      	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
      	at hudson.security.ChainedServletFilter2$1.doFilter(ChainedServletFilter2.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.ChainedServletFilter2$1.doFilter(ChainedServletFilter2.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.ChainedServletFilter2$1.doFilter(ChainedServletFilter2.java:99)
      	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:98)
      	at hudson.security.ChainedServletFilter2$1.doFilter(ChainedServletFilter2.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.ChainedServletFilter2$1.doFilter(ChainedServletFilter2.java:99)
      	at hudson.security.ChainedServletFilter2.doFilter(ChainedServletFilter2.java:111)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:173)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1638)
      	at org.kohsuke.stapler.UncaughtExceptionFilter.doFilter(UncaughtExceptionFilter.java:26)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1638)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1638)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:31)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1638)
      	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1638)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler.doHandle(ServletHandler.java:526)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ScopedHandler.handle(ScopedHandler.java:127)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.security.SecurityHandler.handle(SecurityHandler.java:574)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.HandlerWrapper.handle(HandlerWrapper.java:124)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ScopedHandler.nextHandle(ScopedHandler.java:197)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.SessionHandler.doHandle(SessionHandler.java:609)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ScopedHandler.nextHandle(ScopedHandler.java:195)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler.doHandle(ContextHandler.java:1035)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ScopedHandler.nextScope(ScopedHandler.java:164)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler.doScope(ServletHandler.java:483)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ScopedHandler.nextScope(ScopedHandler.java:162)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.SessionHandler.doScope(SessionHandler.java:586)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ScopedHandler.nextScope(ScopedHandler.java:162)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler.doScope(ContextHandler.java:956)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ScopedHandler.handle(ScopedHandler.java:125)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler.handle(ContextHandler.java:1694)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1576)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.HttpChannel.dispatch(HttpChannel.java:738)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.HttpChannel.handle(HttpChannel.java:511)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler$CoreContextHandler$CoreToNestedHandler.handle(ContextHandler.java:2862)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1060)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:597)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.server.Server.handle(Server.java:181)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:661)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:406)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:478)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:441)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:311)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:979)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1209)
      	at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1164)
      	at java.base/java.lang.Thread.run(Unknown Source)
      
      

      In case of disabled sectioned view plugin - all is good.

        1. plugins.txt
          2 kB
        2. run-jenkins.sh
          0.9 kB
        3. sectioned-view.zip
          76 kB

          [JENKINS-74846] Upgraded to 2.479.1, can't create a new job from within a sectioned view

          Mark Waite added a comment -

          I'm unable to duplicate the issue based on the desription. Steps that I took while trying to duplicate the issue include:

          1. Create a plugins.txt file that lists the installed plugins and their versions, included sectioned view 1.28
          2. Create a run-jenkins.sh shell script that downloads Jenkins 2.479.1, downloads the plugins from plugins.txt, and runs Jenkins
          3. Run the run-jenkins.sh shell script and complete the setup wizard by creating a user and installing no additional plugins
          4. Create a new Pipeline job that runs the sample Pipeline script and run that new Pipeline job

          Can you provide more details so that others can duplicate the issue with a fresh installation of Jenkins?

          "How to report an issue" includes instructions and helpful scripts.

          Mark Waite added a comment - I'm unable to duplicate the issue based on the desription. Steps that I took while trying to duplicate the issue include: Create a plugins.txt file that lists the installed plugins and their versions, included sectioned view 1.28 Create a run-jenkins.sh shell script that downloads Jenkins 2.479.1, downloads the plugins from plugins.txt, and runs Jenkins Run the run-jenkins.sh shell script and complete the setup wizard by creating a user and installing no additional plugins Create a new Pipeline job that runs the sample Pipeline script and run that new Pipeline job Can you provide more details so that others can duplicate the issue with a fresh installation of Jenkins? "How to report an issue" includes instructions and helpful scripts.

          Denis added a comment -

          I did next test:

          Disabled sectioned view plugin, restarted jenkins - all jobs lost their view and places, but I can create new job.

          Then I enabled plugin back and restarted jenkins. Jobs still don't have any old structure, but if I create the new structure with the sections and list views - all good, and I can create new jobs without any issues.

          So seems it something with xml config when migrating to new version.

          Will try now to compare the old section view config and new to check what differences.

          Denis added a comment - I did next test: Disabled sectioned view plugin, restarted jenkins - all jobs lost their view and places, but I can create new job. Then I enabled plugin back and restarted jenkins. Jobs still don't have any old structure, but if I create the new structure with the sections and list views - all good, and I can create new jobs without any issues. So seems it something with xml config when migrating to new version. Will try now to compare the old section view config and new to check what differences.

          Denis added a comment -

          From the last tests I understand, that I can't create new job only if my view is set to any other than "All" (default view).

           

          Denis added a comment - From the last tests I understand, that I can't create new job only if my view is set to any other than "All" (default view).  

          Mark Waite added a comment -

          That may indicate that the problem is related to JENKINS-74795. Does the same issue occur if you run with Jenkins 2.485?

          Mark Waite added a comment - That may indicate that the problem is related to JENKINS-74795 . Does the same issue occur if you run with Jenkins 2.485?

          Mark Waite added a comment -

          I've just confirmed that it is not JENKINS-74795. Creating an item fails on 2.485 if a section view is the default view.

          Mark Waite added a comment - I've just confirmed that it is not JENKINS-74795 . Creating an item fails on 2.485 if a section view is the default view.

          Denis added a comment -

          Yes, I can reproduce it with version 2.485.

          Steps to reproduce:

          1. install tomcat 10.1.33 (latest) and run it with java 21 or 22
          2. install jenkins with default plugins, and then add "sectioned view" plugin
          3. create some empty job/pipeline
          4. when at least one job exists you will have possibility to add new view with "+" in the breadcrumbs
          5. add new sectioned view, and create inside some list view
          6. try to add new job, when you inside the created view

           

          Denis added a comment - Yes, I can reproduce it with version 2.485. Steps to reproduce: install tomcat 10.1.33 (latest) and run it with java 21 or 22 install jenkins with default plugins, and then add "sectioned view" plugin create some empty job/pipeline when at least one job exists you will have possibility to add new view with "+" in the breadcrumbs add new sectioned view, and create inside some list view try to add new job, when you inside the created view  

          Mark Waite added a comment -

          Thanks! I've also confirmed that the proposed fix from basil works in my installation. I've uploaded a pre-release build of that as sectioned-view.zip . Can you confirm that it fixes the cases that you are seeing as well?

          Mark Waite added a comment - Thanks! I've also confirmed that the proposed fix from basil works in my installation. I've uploaded a pre-release build of that as sectioned-view.zip . Can you confirm that it fixes the cases that you are seeing as well?

          Denis added a comment -

          Yes, confirmed. This fixed plugin is works.

          Thanks a lot!

          Denis added a comment - Yes, confirmed. This fixed plugin is works. Thanks a lot!

          Michal added a comment -

          Fix released in version 1.29. Thanks basil !

          Michal added a comment - Fix released in version 1.29. Thanks basil !

            basil Basil Crow
            den23513 Denis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: