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

Error code 500 when session times out

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 1.500 on RHEL 5 x86_64
    • Similar Issues:

      Description

      When the session times out, user is no longer logged in. Trying to reach any page that is unavailable for anonymous users (even a simple refresh on the page) result in server error:

      Status Code: 500
      Exception: org.apache.commons.jelly.JellyTagException: jar:file:/jenkins/jenkins_home/war/WEB-INF/lib/jenkins-core-1.500.jar!/hudson/model/View/index.jelly:44:43: <st:include> Cannot invoke method isEmpty() on null object
      Stacktrace: 
      javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/jenkins/jenkins_home/war/WEB-INF/lib/jenkins-core-1.500.jar!/hudson/model/View/index.jelly:44:43: <st:include> Cannot invoke method isEmpty() on null object
              at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:112)
              at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:562)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
              at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
              at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:573)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:487)
              at org.kohsuke.stapler.Stapler.service(Stapler.java:164)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:50)
              at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
              at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
              at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
              at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
              at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
              at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
              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 org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)
              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:135)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:272)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:175)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
              at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
              at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
              at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
              at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
              at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
              at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
              at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
              at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:215)
              at winstone.RequestHandlerThread.run(RequestHandlerThread.java:140)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: org.apache.commons.jelly.JellyTagException: jar:file:/jenkins/jenkins_home/war/WEB-INF/lib/jenkins-core-1.500.jar!/hudson/model/View/index.jelly:44:43: <st:include> Cannot invoke method isEmpty() on null object
              at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:726)
              at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:281)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:93)
              at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
              at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
              at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:93)
              at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:93)
              at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:106)
              at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:93)
              at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
              at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
              at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:93)
              at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:100)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:93)
              at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:100)
              at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:100)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:93)
              at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:100)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:93)
              at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:100)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:93)
              at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:106)
              at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
              at org.kohsuke.stapler.jelly.CompressTag.doTag(CompressTag.java:45)
              at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
              at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:82)
              at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:64)
              at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:55)
              at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:107)
              at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:562)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
              at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:242)
              ... 42 more
      Caused by: java.lang.NullPointerException: Cannot invoke method isEmpty() on null object
              at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
              at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
              at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
              at java_util_List$isEmpty.call(Unknown Source)
              at hudson.model.View.main.run(main.groovy:6)
              at org.kohsuke.stapler.jelly.groovy.GroovierJellyScript.run(GroovierJellyScript.java:66)
              at org.kohsuke.stapler.jelly.groovy.GroovierJellyScript.run(GroovierJellyScript.java:59)
              at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
              at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
              ... 77 more
      

      I believe it would be much more intuitive if the user was redirected to login page rather than showing error page with stack trace

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              raspy Krzysztof Malinowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: