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

Job-JSON-API throws NoClassDefFoundError: org/kohsuke/stapler/export/FieldProperty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • 2.46.1 LTS

      Since upgrading to Jenkins 2.46.1 LTS we're getting a NoClassDefFoundError: org/kohsuke/stapler/export/FieldProperty for some Jobs when accessing the JSON or XML API.

      Full stacktrace:

      java.lang.NoClassDefFoundError: org/kohsuke/stapler/export/FieldProperty at org.kohsuke.stapler.export.Model.<init>(Model.java:96) at org.kohsuke.stapler.export.ModelBuilder.get(ModelBuilder.java:51) at org.kohsuke.stapler.export.Property.writeValue(Property.java:209) at org.kohsuke.stapler.export.Property.writeBuffered(Property.java:181) at org.kohsuke.stapler.export.Property.writeValue(Property.java:242) at org.kohsuke.stapler.export.Property.writeValue(Property.java:175) at org.kohsuke.stapler.export.Property.writeTo(Property.java:146) at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:227) at org.kohsuke.stapler.export.Property.writeValue(Property.java:317) at org.kohsuke.stapler.export.Property.writeBuffered(Property.java:181) at org.kohsuke.stapler.export.Property.writeValue(Property.java:242) at org.kohsuke.stapler.export.Property.writeValue(Property.java:175) at org.kohsuke.stapler.export.Property.writeTo(Property.java:146) at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:227) at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:223) at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:223) at org.kohsuke.stapler.export.Model.writeTo(Model.java:198) at org.kohsuke.stapler.ResponseImpl.writeOne(ResponseImpl.java:285) at org.kohsuke.stapler.ResponseImpl.serveExposedBean(ResponseImpl.java:276) at hudson.model.Api.doJson(Api.java:208) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) Caused: javax.servlet.ServletException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:765) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:209) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:220) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:197) at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85) at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:110) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

      In the Jenkins log I'm seeing the following exception
      Caught exception evaluating: request.getSession() in /jenkins/job/<redacted>/api/json. Reason: java.lang.IllegalStateException: Cannot create a session after the response has been committed
      {{ java.lang.IllegalStateException: Cannot create a session after the response has been committed}}
      {{ at org.apache.catalina.connector.Request.doGetSession(Request.java:2929)}}
      {{ at org.apache.catalina.connector.Request.getSession(Request.java:2298)}}
      {{ at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:895)}}
      {{ at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:907)}}
      {{ at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:240)}}
      {{ at sun.reflect.GeneratedMethodAccessor2400.invoke(Unknown Source)}}
      {{ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)}}
      {{ at java.lang.reflect.Method.invoke(Method.java:498)}}
      {{ at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)}}
      {{ at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104)}}
      {{ at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)}}
      {{ at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)}}
      {{ at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)}}
      {{ at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)}}
      {{ at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)}}
      {{ at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134)}}
      {{ at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)}}
      {{ at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)}}
      {{ at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)}}
      {{ at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)}}
      {{ at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)}}
      {{ at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)}}
      {{ at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)}}
      {{ at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)}}
      {{ at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:97)}}
      {{ at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)}}
      {{ at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)}}
      {{ at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)}}
      {{ at hudson.init.impl.InstallUncaughtExceptionHandler$1.reportException(InstallUncaughtExceptionHandler.java:30)}}
      {{ at org.kohsuke.stapler.compression.CompressionFilter.reportException(CompressionFilter.java:77)}}
      {{ at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:55)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)}}
      {{ at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)}}
      {{ at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)}}
      {{ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)}}
      {{ at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)}}
      {{ at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)}}
      {{ at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)}}
      {{ at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)}}
      {{ at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)}}
      {{ at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)}}
      {{ at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)}}
      {{ at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)}}
      {{ at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)}}
      {{ at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)}}
      {{ at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)}}
      {{ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)}}
      {{ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)}}
      {{ at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)}}
      {{ at java.lang.Thread.run(Thread.java:745)}}

      Is there any way to find out what causes this and why it is only happening for some jobs?

            Unassigned Unassigned
            tehlexx Alexander Floh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: