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

IllegalAccessException fired when accessing the build time trend on Java 17

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Jenkins 2.342, Temurin 17.0.2+8
    • 2.350, 2.346.1

      When accessing the build time trend on baseUrl/job/<job>/buildTimeTrend, the following IllegalAccessException is fired:

      Apr. 07, 2022 2:22:05 PM WARNUNG hudson.ExpressionFactory2$JexlExpression evaluate
      Caught exception evaluating: (tz.rawOffset + tz.DSTSavings) / 3600000 in /job/gradle%20project/buildTimeTrend. Reason: java.lang.IllegalAccessException: class org.apache.commons.jexl.util.PropertyExecutor cannot access class sun.util.calendar.ZoneInfo (in module java.base) because module java.base does not export sun.util.calendar to unnamed module @d9345cd
      java.lang.IllegalAccessException: class org.apache.commons.jexl.util.PropertyExecutor cannot access class sun.util.calendar.ZoneInfo (in module java.base) because module java.base does not export sun.util.calendar to unnamed module @d9345cd
      	at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392)
      	at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:560)
      	at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
      	at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
      	at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
      	at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
      	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.ASTAddNode.value(ASTAddNode.java:61)
      	at org.apache.commons.jexl.parser.ASTExpression.value(ASTExpression.java:54)
      	at org.apache.commons.jexl.parser.ASTDivNode.value(ASTDivNode.java:55)
      	at org.apache.commons.jexl.parser.ASTExpression.value(ASTExpression.java:54)
      	at org.apache.commons.jexl.parser.ASTExpressionExpression.value(ASTExpressionExpression.java:56)
      	at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
      	at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:76)
      	at org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse(ExpressionSupport.java:61)
      	at org.apache.commons.jelly.expression.ExpressionSupport.evaluateAsString(ExpressionSupport.java:46)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.buildAttributes(ReallyStaticTagLibrary.java:113)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:97)
      	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:99)
      	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:172)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101)
      	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
      	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:122)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101)
      	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101)
      	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265)
      	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:122)
      	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:122)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:99)
      	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:66)
      	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:55)
      	at org.kohsuke.stapler.jelly.ScriptInvoker.execute(ScriptInvoker.java:56)
      	at org.kohsuke.stapler.jelly.ScriptInvoker.execute(ScriptInvoker.java:43)
      	at org.kohsuke.stapler.Facet$1.dispatch(Facet.java:240)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
      	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:766)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:694)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:240)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
      	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:157)
      	at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      	at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:81)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:160)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:160)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
      	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:122)
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:102)
      	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:93)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:219)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:213)
      	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:110)
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
      	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:193)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:53)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
      	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:571)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      	at org.eclipse.jetty.server.Server.handle(Server.java:516)
      	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
      	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      

      The graph itself looks fine, I didn't encounter missing data yet.

          [JENKINS-68215] IllegalAccessException fired when accessing the build time trend on Java 17

          Basil Crow added a comment -

          The proximate cause of the problem is this code in core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly:

          <j:invokeStatic var="tz" className="java.util.TimeZone" method="getDefault"/>
          <div id="build-timeline-div" data-hour-local-timezone="${(tz.rawOffset + tz.DSTSavings) / 3600000}"></div>
          

          The following change works around the problem:

          diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java
          index 879791296a..dcb39fdf5c 100644
          --- a/core/src/main/java/hudson/Functions.java
          +++ b/core/src/main/java/hudson/Functions.java
          @@ -134,6 +134,7 @@ import java.util.Set;
           import java.util.SortedMap;
           import java.util.TimeZone;
           import java.util.TreeMap;
          +import java.util.concurrent.TimeUnit;
           import java.util.concurrent.atomic.AtomicLong;
           import java.util.function.Predicate;
           import java.util.logging.Level;
          @@ -712,6 +713,12 @@ public class Functions {
                   return tz.getDisplayName(tz.observesDaylightTime(), TimeZone.SHORT);
               }
           
          +    @Restricted(NoExternalUse.class)
          +    public static long getHourLocalTimezone() {
          +        TimeZone tz = TimeZone.getDefault();
          +        return TimeUnit.MILLISECONDS.toHours(tz.getRawOffset() + tz.getDSTSavings());
          +    }
          +
               /**
                * Finds the given object in the ancestor list and returns its URL.
                * This is used to determine the "current" URL assigned to the given object,
          diff --git a/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly b/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly
          index 0d8a0e7e4e..d2cccc75f7 100644
          --- a/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly
          +++ b/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly
          @@ -37,7 +37,7 @@ THE SOFTWARE.
             <link rel="stylesheet" type="text/css" href="${resURL}/scripts/yui/assets/skins/sam/resize.css"/>
             <script type="text/javascript" src="${resURL}/scripts/yui/resize/resize-min.js"></script>
           
          -  <j:invokeStatic var="tz" className="java.util.TimeZone" method="getDefault"/>
          -  <div id="build-timeline-div" data-hour-local-timezone="${(tz.rawOffset + tz.DSTSavings) / 3600000}"></div>
          +  <j:invokeStatic var="tz" className="hudson.Functions" method="getHourLocalTimezone"/>
          +  <div id="build-timeline-div" data-hour-local-timezone="${tz}"></div>
             <st:adjunct includes="hudson.model.BuildTimelineWidget.build-timeline-widget" />
           </j:jelly>
          

          However I feel that the root cause of the problem is that Stapler isn't able to do in Jelly what it is able to do in Java.

          Basil Crow added a comment - The proximate cause of the problem is this code in core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly : <j:invokeStatic var= "tz" className= "java.util.TimeZone" method= "getDefault" /> <div id= "build-timeline-div" data-hour-local-timezone= "${(tz.rawOffset + tz.DSTSavings) / 3600000}" > </div> The following change works around the problem: diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 879791296a..dcb39fdf5c 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -134,6 +134,7 @@ import java.util.Set; import java.util.SortedMap; import java.util.TimeZone; import java.util.TreeMap; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import java.util.function.Predicate; import java.util.logging.Level; @@ -712,6 +713,12 @@ public class Functions { return tz.getDisplayName(tz.observesDaylightTime(), TimeZone.SHORT); } + @Restricted(NoExternalUse.class) + public static long getHourLocalTimezone() { + TimeZone tz = TimeZone.getDefault(); + return TimeUnit.MILLISECONDS.toHours(tz.getRawOffset() + tz.getDSTSavings()); + } + /** * Finds the given object in the ancestor list and returns its URL. * This is used to determine the "current" URL assigned to the given object, diff --git a/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly b/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly index 0d8a0e7e4e..d2cccc75f7 100644 --- a/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly +++ b/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly @@ -37,7 +37,7 @@ THE SOFTWARE. <link rel="stylesheet" type="text/css" href="${resURL}/scripts/yui/assets/skins/sam/resize.css"/> <script type="text/javascript" src="${resURL}/scripts/yui/resize/resize-min.js"></script> - <j:invokeStatic var="tz" className="java.util.TimeZone" method="getDefault"/> - <div id="build-timeline-div" data-hour-local-timezone="${(tz.rawOffset + tz.DSTSavings) / 3600000}"></div> + <j:invokeStatic var="tz" className="hudson.Functions" method="getHourLocalTimezone"/> + <div id="build-timeline-div" data-hour-local-timezone="${tz}"></div> <st:adjunct includes="hudson.model.BuildTimelineWidget.build-timeline-widget" /> </j:jelly> However I feel that the root cause of the problem is that Stapler isn't able to do in Jelly what it is able to do in Java.

          Interesting, are you aware of similar scenarios of Jelly restrictions by Stapler? I didn't face such limitations yet, but I can raise a separate issue on the Stapler repository. 

          An intermediary solution would be to use your diff, though we may have more of these in the future, if Java 17 (or newer) proceeds forward.

          Alexander Brandes added a comment - Interesting, are you aware of similar scenarios of Jelly restrictions by Stapler? I didn't face such limitations yet, but I can raise a separate issue on the Stapler repository.  An intermediary solution would be to use your diff, though we may have more of these in the future, if Java 17 (or newer) proceeds forward.

          Basil Crow added a comment - These could also be a problem: https://github.com/jenkinsci/jenkins/blob/d940767221b7b6ebe62161e6a9740e0bc32868ca/core/src/main/resources/hudson/triggers/TimerTrigger/help-spec.jelly#L107 https://github.com/jenkinsci/agent-maintenance-plugin/blob/033d0dc6a93ac315c6a51c86d75e8511e471aaeb/src/main/resources/com/sap/prd/jenkins/plugins/agent_maintenance/MaintenanceWindow/help-startTime.jelly#L4 https://github.com/jenkinsci/agent-maintenance-plugin/blob/033d0dc6a93ac315c6a51c86d75e8511e471aaeb/src/main/resources/com/sap/prd/jenkins/plugins/agent_maintenance/MaintenanceWindow/help-endTime.jelly#L4 I suspect there could also be a problem with Groovy views.

          Basil Crow added a comment -

          I suspect there could also be a problem with Groovy views.

          I confirmed there is not a problem with Groovy views. This works:

          diff --git a/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config.groovy b/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config.groovy
          index fc1fcd6f1c..45e3ca3450 100644
          --- a/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config.groovy
          +++ b/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config.groovy
          @@ -12,3 +12,6 @@ f.section(title:_("Jenkins Location")) {
                   f.textbox()
               }
           }
          +
          +def tz = java.util.TimeZone.getDefault()
          +h3('Timezone = ' + ((tz.rawOffset + tz.DSTSavings) / 3600000))
          

          I see "Timezone = -7". So this problem doesn't exist for Java code executed by Stapler and it doesn't exist for Stapler Groovy views, but it does exist for Stapler Jelly views.

          Basil Crow added a comment - I suspect there could also be a problem with Groovy views. I confirmed there is not a problem with Groovy views. This works: diff --git a/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config.groovy b/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config.groovy index fc1fcd6f1c..45e3ca3450 100644 --- a/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config.groovy +++ b/core/src/main/resources/jenkins/model/JenkinsLocationConfiguration/config.groovy @@ -12,3 +12,6 @@ f.section(title:_("Jenkins Location")) { f.textbox() } } + +def tz = java.util.TimeZone.getDefault() +h3('Timezone = ' + ((tz.rawOffset + tz.DSTSavings) / 3600000)) I see "Timezone = -7". So this problem doesn't exist for Java code executed by Stapler and it doesn't exist for Stapler Groovy views, but it does exist for Stapler Jelly views.

          Basil Crow added a comment -

          Here is a stack trace from the successful invocation from Stapler in Groovy. The key difference is that in java.lang.reflect.Method#invoke, we are invoking public abstract int java.util.TimeZone.getRawOffset() rather than public int sun.util.calendar.ZoneInfo.getRawOffset(). So at a high level I think the solution would be to make Stapler behave with Jelly the way it behaves in Groovy, by choosing the abstract method handle.

          getRawOffset:428, ZoneInfo (sun.util.calendar)
          invoke0:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
          invoke:77, NativeMethodAccessorImpl (jdk.internal.reflect)
          invoke:43, DelegatingMethodAccessorImpl (jdk.internal.reflect)
          invoke:568, Method (java.lang.reflect)
          invoke:98, CachedMethod (org.codehaus.groovy.reflection)
          doMethodInvoke:325, MetaMethod (groovy.lang)
          getProperty:76, MethodMetaProperty$GetBeanMethodMetaProperty (org.codehaus.groovy.runtime.metaclass)
          getProperty:63, GetEffectivePojoPropertySite (org.codehaus.groovy.runtime.callsite)
          callGetProperty:299, AbstractCallSite (org.codehaus.groovy.runtime.callsite)
          run:17, config (jenkins.model.JenkinsLocationConfiguration)
          run:94, GroovierJellyScript (org.kohsuke.stapler.jelly.groovy)
          run:71, GroovierJellyScript (org.kohsuke.stapler.jelly.groovy)
          doTag:172, IncludeTag (org.kohsuke.stapler.jelly)
          run:265, TagScript (org.apache.commons.jelly.impl)
          run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly)
          doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define)
          run:265, TagScript (org.apache.commons.jelly.impl)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly)
          invokeBody:161, TagSupport (org.apache.commons.jelly)
          doTag:41, OtherwiseTag (org.apache.commons.jelly.tags.core)
          run:265, TagScript (org.apache.commons.jelly.impl)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          invokeBody:161, TagSupport (org.apache.commons.jelly)
          doTag:38, ChooseTag (org.apache.commons.jelly.tags.core)
          run:265, TagScript (org.apache.commons.jelly.impl)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core)
          run:122, CallTagLibScript (org.kohsuke.stapler.jelly)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          invokeBody:161, TagSupport (org.apache.commons.jelly)
          doTag:150, ForEachTag (org.apache.commons.jelly.tags.core)
          run:265, TagScript (org.apache.commons.jelly.impl)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly)
          doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define)
          run:265, TagScript (org.apache.commons.jelly.impl)
          run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly)
          run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core)
          run:122, CallTagLibScript (org.kohsuke.stapler.jelly)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly)
          doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define)
          run:265, TagScript (org.apache.commons.jelly.impl)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:98, CoreTagLibrary$1 (org.apache.commons.jelly.tags.core)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core)
          run:122, CallTagLibScript (org.kohsuke.stapler.jelly)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly)
          doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define)
          run:265, TagScript (org.apache.commons.jelly.impl)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly)
          doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define)
          run:265, TagScript (org.apache.commons.jelly.impl)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core)
          run:122, CallTagLibScript (org.kohsuke.stapler.jelly)
          run:95, ScriptBlock (org.apache.commons.jelly.impl)
          run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core)
          run:122, CallTagLibScript (org.kohsuke.stapler.jelly)
          run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core)
          run:99, JellyViewScript (org.kohsuke.stapler.jelly)
          invokeScript:66, DefaultScriptInvoker (org.kohsuke.stapler.jelly)
          invokeScript:55, DefaultScriptInvoker (org.kohsuke.stapler.jelly)
          execute:56, ScriptInvoker (org.kohsuke.stapler.jelly)
          execute:43, ScriptInvoker (org.kohsuke.stapler.jelly)
          dispatch:240, Facet$1 (org.kohsuke.stapler)
          tryInvoke:766, Stapler (org.kohsuke.stapler)
          invoke:898, Stapler (org.kohsuke.stapler)
          invoke:694, Stapler (org.kohsuke.stapler)
          service:240, Stapler (org.kohsuke.stapler)
          service:790, HttpServlet (javax.servlet.http)
          handle:799, ServletHolder (org.eclipse.jetty.servlet)
          doFilter:1631, ServletHandler$ChainEnd (org.eclipse.jetty.servlet)
          doFilter:157, PluginServletFilter$1 (hudson.util)
          doFilter:81, ResourceDomainFilter (jenkins.security)
          doFilter:154, PluginServletFilter$1 (hudson.util)
          doFilter:129, UserLanguages$AcceptLanguageFilter (jenkins.telemetry.impl)
          doFilter:154, PluginServletFilter$1 (hudson.util)
          doFilter:160, PluginServletFilter (hudson.util)
          doFilter:193, FilterHolder (org.eclipse.jetty.servlet)
          doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet)
          doFilter:160, CrumbFilter (hudson.security.csrf)
          doFilter:193, FilterHolder (org.eclipse.jetty.servlet)
          doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet)
          doFilter:94, ChainedServletFilter$1 (hudson.security)
          doFilter:52, AcegiSecurityExceptionFilter (jenkins.security)
          doFilter:99, ChainedServletFilter$1 (hudson.security)
          doFilter:54, UnwrapSecurityExceptionFilter (hudson.security)
          doFilter:99, ChainedServletFilter$1 (hudson.security)
          doFilter:122, ExceptionTranslationFilter (org.springframework.security.web.access)
          doFilter:116, ExceptionTranslationFilter (org.springframework.security.web.access)
          doFilter:99, ChainedServletFilter$1 (hudson.security)
          doFilter:109, AnonymousAuthenticationFilter (org.springframework.security.web.authentication)
          doFilter:99, ChainedServletFilter$1 (hudson.security)
          doFilter:136, RememberMeAuthenticationFilter (org.springframework.security.web.authentication.rememberme)
          doFilter:93, RememberMeAuthenticationFilter (org.springframework.security.web.authentication.rememberme)
          doFilter:99, ChainedServletFilter$1 (hudson.security)
          doFilter:219, AbstractAuthenticationProcessingFilter (org.springframework.security.web.authentication)
          doFilter:213, AbstractAuthenticationProcessingFilter (org.springframework.security.web.authentication)
          doFilter:99, ChainedServletFilter$1 (hudson.security)
          doFilter:97, BasicHeaderProcessor (jenkins.security)
          doFilter:99, ChainedServletFilter$1 (hudson.security)
          doFilter:110, SecurityContextPersistenceFilter (org.springframework.security.web.context)
          doFilter:80, SecurityContextPersistenceFilter (org.springframework.security.web.context)
          doFilter:63, HttpSessionContextIntegrationFilter2 (hudson.security)
          doFilter:99, ChainedServletFilter$1 (hudson.security)
          doFilter:111, ChainedServletFilter (hudson.security)
          doFilter:172, HudsonFilter (hudson.security)
          doFilter:193, FilterHolder (org.eclipse.jetty.servlet)
          doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet)
          doFilter:53, CompressionFilter (org.kohsuke.stapler.compression)
          doFilter:193, FilterHolder (org.eclipse.jetty.servlet)
          doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet)
          doFilter:86, CharacterEncodingFilter (hudson.util)
          doFilter:193, FilterHolder (org.eclipse.jetty.servlet)
          doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet)
          doFilter:30, DiagnosticThreadNameFilter (org.kohsuke.stapler)
          doFilter:193, FilterHolder (org.eclipse.jetty.servlet)
          doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet)
          doFilter:38, SuspiciousRequestFilter (jenkins.security)
          doFilter:193, FilterHolder (org.eclipse.jetty.servlet)
          doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet)
          doHandle:548, ServletHandler (org.eclipse.jetty.servlet)
          handle:143, ScopedHandler (org.eclipse.jetty.server.handler)
          handle:571, SecurityHandler (org.eclipse.jetty.security)
          handle:127, HandlerWrapper (org.eclipse.jetty.server.handler)
          nextHandle:235, ScopedHandler (org.eclipse.jetty.server.handler)
          doHandle:1624, SessionHandler (org.eclipse.jetty.server.session)
          nextHandle:233, ScopedHandler (org.eclipse.jetty.server.handler)
          doHandle:1440, ContextHandler (org.eclipse.jetty.server.handler)
          nextScope:188, ScopedHandler (org.eclipse.jetty.server.handler)
          doScope:501, ServletHandler (org.eclipse.jetty.servlet)
          doScope:1594, SessionHandler (org.eclipse.jetty.server.session)
          nextScope:186, ScopedHandler (org.eclipse.jetty.server.handler)
          doScope:1355, ContextHandler (org.eclipse.jetty.server.handler)
          handle:141, ScopedHandler (org.eclipse.jetty.server.handler)
          handle:127, HandlerWrapper (org.eclipse.jetty.server.handler)
          handle:516, Server (org.eclipse.jetty.server)
          lambda$handle$1:487, HttpChannel (org.eclipse.jetty.server)
          dispatch:-1, HttpChannel$$Lambda$400/0x0000000801646e80 (org.eclipse.jetty.server)
          dispatch:732, HttpChannel (org.eclipse.jetty.server)
          handle:479, HttpChannel (org.eclipse.jetty.server)
          onFillable:277, HttpConnection (org.eclipse.jetty.server)
          succeeded:311, AbstractConnection$ReadCallback (org.eclipse.jetty.io)
          fillable:105, FillInterest (org.eclipse.jetty.io)
          run:104, ChannelEndPoint$1 (org.eclipse.jetty.io)
          runTask:338, EatWhatYouKill (org.eclipse.jetty.util.thread.strategy)
          doProduce:315, EatWhatYouKill (org.eclipse.jetty.util.thread.strategy)
          tryProduce:173, EatWhatYouKill (org.eclipse.jetty.util.thread.strategy)
          run:131, EatWhatYouKill (org.eclipse.jetty.util.thread.strategy)
          run:409, ReservedThreadExecutor$ReservedThread (org.eclipse.jetty.util.thread)
          runJob:883, QueuedThreadPool (org.eclipse.jetty.util.thread)
          run:1034, QueuedThreadPool$Runner (org.eclipse.jetty.util.thread)
          run:833, Thread (java.lang)
          

          Basil Crow added a comment - Here is a stack trace from the successful invocation from Stapler in Groovy. The key difference is that in java.lang.reflect.Method#invoke , we are invoking public abstract int java.util.TimeZone.getRawOffset() rather than public int sun.util.calendar.ZoneInfo.getRawOffset() . So at a high level I think the solution would be to make Stapler behave with Jelly the way it behaves in Groovy, by choosing the abstract method handle. getRawOffset:428, ZoneInfo (sun.util.calendar) invoke0:-1, NativeMethodAccessorImpl (jdk.internal.reflect) invoke:77, NativeMethodAccessorImpl (jdk.internal.reflect) invoke:43, DelegatingMethodAccessorImpl (jdk.internal.reflect) invoke:568, Method (java.lang.reflect) invoke:98, CachedMethod (org.codehaus.groovy.reflection) doMethodInvoke:325, MetaMethod (groovy.lang) getProperty:76, MethodMetaProperty$GetBeanMethodMetaProperty (org.codehaus.groovy.runtime.metaclass) getProperty:63, GetEffectivePojoPropertySite (org.codehaus.groovy.runtime.callsite) callGetProperty:299, AbstractCallSite (org.codehaus.groovy.runtime.callsite) run:17, config (jenkins.model.JenkinsLocationConfiguration) run:94, GroovierJellyScript (org.kohsuke.stapler.jelly.groovy) run:71, GroovierJellyScript (org.kohsuke.stapler.jelly.groovy) doTag:172, IncludeTag (org.kohsuke.stapler.jelly) run:265, TagScript (org.apache.commons.jelly.impl) run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly) doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define) run:265, TagScript (org.apache.commons.jelly.impl) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly) invokeBody:161, TagSupport (org.apache.commons.jelly) doTag:41, OtherwiseTag (org.apache.commons.jelly.tags.core) run:265, TagScript (org.apache.commons.jelly.impl) run:95, ScriptBlock (org.apache.commons.jelly.impl) invokeBody:161, TagSupport (org.apache.commons.jelly) doTag:38, ChooseTag (org.apache.commons.jelly.tags.core) run:265, TagScript (org.apache.commons.jelly.impl) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core) run:122, CallTagLibScript (org.kohsuke.stapler.jelly) run:95, ScriptBlock (org.apache.commons.jelly.impl) invokeBody:161, TagSupport (org.apache.commons.jelly) doTag:150, ForEachTag (org.apache.commons.jelly.tags.core) run:265, TagScript (org.apache.commons.jelly.impl) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly) doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define) run:265, TagScript (org.apache.commons.jelly.impl) run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly) run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core) run:122, CallTagLibScript (org.kohsuke.stapler.jelly) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly) doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define) run:265, TagScript (org.apache.commons.jelly.impl) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:98, CoreTagLibrary$1 (org.apache.commons.jelly.tags.core) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core) run:122, CallTagLibScript (org.kohsuke.stapler.jelly) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly) doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define) run:265, TagScript (org.apache.commons.jelly.impl) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:101, ReallyStaticTagLibrary$1 (org.kohsuke.stapler.jelly) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:101, CallTagLibScript$1 (org.kohsuke.stapler.jelly) doTag:91, InvokeBodyTag (org.apache.commons.jelly.tags.define) run:265, TagScript (org.apache.commons.jelly.impl) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core) run:122, CallTagLibScript (org.kohsuke.stapler.jelly) run:95, ScriptBlock (org.apache.commons.jelly.impl) run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core) run:122, CallTagLibScript (org.kohsuke.stapler.jelly) run:105, CoreTagLibrary$2 (org.apache.commons.jelly.tags.core) run:99, JellyViewScript (org.kohsuke.stapler.jelly) invokeScript:66, DefaultScriptInvoker (org.kohsuke.stapler.jelly) invokeScript:55, DefaultScriptInvoker (org.kohsuke.stapler.jelly) execute:56, ScriptInvoker (org.kohsuke.stapler.jelly) execute:43, ScriptInvoker (org.kohsuke.stapler.jelly) dispatch:240, Facet$1 (org.kohsuke.stapler) tryInvoke:766, Stapler (org.kohsuke.stapler) invoke:898, Stapler (org.kohsuke.stapler) invoke:694, Stapler (org.kohsuke.stapler) service:240, Stapler (org.kohsuke.stapler) service:790, HttpServlet (javax.servlet.http) handle:799, ServletHolder (org.eclipse.jetty.servlet) doFilter:1631, ServletHandler$ChainEnd (org.eclipse.jetty.servlet) doFilter:157, PluginServletFilter$1 (hudson.util) doFilter:81, ResourceDomainFilter (jenkins.security) doFilter:154, PluginServletFilter$1 (hudson.util) doFilter:129, UserLanguages$AcceptLanguageFilter (jenkins.telemetry.impl) doFilter:154, PluginServletFilter$1 (hudson.util) doFilter:160, PluginServletFilter (hudson.util) doFilter:193, FilterHolder (org.eclipse.jetty.servlet) doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet) doFilter:160, CrumbFilter (hudson.security.csrf) doFilter:193, FilterHolder (org.eclipse.jetty.servlet) doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet) doFilter:94, ChainedServletFilter$1 (hudson.security) doFilter:52, AcegiSecurityExceptionFilter (jenkins.security) doFilter:99, ChainedServletFilter$1 (hudson.security) doFilter:54, UnwrapSecurityExceptionFilter (hudson.security) doFilter:99, ChainedServletFilter$1 (hudson.security) doFilter:122, ExceptionTranslationFilter (org.springframework.security.web.access) doFilter:116, ExceptionTranslationFilter (org.springframework.security.web.access) doFilter:99, ChainedServletFilter$1 (hudson.security) doFilter:109, AnonymousAuthenticationFilter (org.springframework.security.web.authentication) doFilter:99, ChainedServletFilter$1 (hudson.security) doFilter:136, RememberMeAuthenticationFilter (org.springframework.security.web.authentication.rememberme) doFilter:93, RememberMeAuthenticationFilter (org.springframework.security.web.authentication.rememberme) doFilter:99, ChainedServletFilter$1 (hudson.security) doFilter:219, AbstractAuthenticationProcessingFilter (org.springframework.security.web.authentication) doFilter:213, AbstractAuthenticationProcessingFilter (org.springframework.security.web.authentication) doFilter:99, ChainedServletFilter$1 (hudson.security) doFilter:97, BasicHeaderProcessor (jenkins.security) doFilter:99, ChainedServletFilter$1 (hudson.security) doFilter:110, SecurityContextPersistenceFilter (org.springframework.security.web.context) doFilter:80, SecurityContextPersistenceFilter (org.springframework.security.web.context) doFilter:63, HttpSessionContextIntegrationFilter2 (hudson.security) doFilter:99, ChainedServletFilter$1 (hudson.security) doFilter:111, ChainedServletFilter (hudson.security) doFilter:172, HudsonFilter (hudson.security) doFilter:193, FilterHolder (org.eclipse.jetty.servlet) doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet) doFilter:53, CompressionFilter (org.kohsuke.stapler.compression) doFilter:193, FilterHolder (org.eclipse.jetty.servlet) doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet) doFilter:86, CharacterEncodingFilter (hudson.util) doFilter:193, FilterHolder (org.eclipse.jetty.servlet) doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet) doFilter:30, DiagnosticThreadNameFilter (org.kohsuke.stapler) doFilter:193, FilterHolder (org.eclipse.jetty.servlet) doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet) doFilter:38, SuspiciousRequestFilter (jenkins.security) doFilter:193, FilterHolder (org.eclipse.jetty.servlet) doFilter:1601, ServletHandler$Chain (org.eclipse.jetty.servlet) doHandle:548, ServletHandler (org.eclipse.jetty.servlet) handle:143, ScopedHandler (org.eclipse.jetty.server.handler) handle:571, SecurityHandler (org.eclipse.jetty.security) handle:127, HandlerWrapper (org.eclipse.jetty.server.handler) nextHandle:235, ScopedHandler (org.eclipse.jetty.server.handler) doHandle:1624, SessionHandler (org.eclipse.jetty.server.session) nextHandle:233, ScopedHandler (org.eclipse.jetty.server.handler) doHandle:1440, ContextHandler (org.eclipse.jetty.server.handler) nextScope:188, ScopedHandler (org.eclipse.jetty.server.handler) doScope:501, ServletHandler (org.eclipse.jetty.servlet) doScope:1594, SessionHandler (org.eclipse.jetty.server.session) nextScope:186, ScopedHandler (org.eclipse.jetty.server.handler) doScope:1355, ContextHandler (org.eclipse.jetty.server.handler) handle:141, ScopedHandler (org.eclipse.jetty.server.handler) handle:127, HandlerWrapper (org.eclipse.jetty.server.handler) handle:516, Server (org.eclipse.jetty.server) lambda$handle$1:487, HttpChannel (org.eclipse.jetty.server) dispatch:-1, HttpChannel$$Lambda$400/0x0000000801646e80 (org.eclipse.jetty.server) dispatch:732, HttpChannel (org.eclipse.jetty.server) handle:479, HttpChannel (org.eclipse.jetty.server) onFillable:277, HttpConnection (org.eclipse.jetty.server) succeeded:311, AbstractConnection$ReadCallback (org.eclipse.jetty.io) fillable:105, FillInterest (org.eclipse.jetty.io) run:104, ChannelEndPoint$1 (org.eclipse.jetty.io) runTask:338, EatWhatYouKill (org.eclipse.jetty.util.thread.strategy) doProduce:315, EatWhatYouKill (org.eclipse.jetty.util.thread.strategy) tryProduce:173, EatWhatYouKill (org.eclipse.jetty.util.thread.strategy) run:131, EatWhatYouKill (org.eclipse.jetty.util.thread.strategy) run:409, ReservedThreadExecutor$ReservedThread (org.eclipse.jetty.util.thread) runJob:883, QueuedThreadPool (org.eclipse.jetty.util.thread) run:1034, QueuedThreadPool$Runner (org.eclipse.jetty.util.thread) run:833, Thread (java.lang)

          Basil Crow added a comment -

          I can reproduce the success case with Groovy and the failure case in Jelly with integration tests in Stapler. From here it should be a small matter of programming to find the solution.

          Basil Crow added a comment - I can reproduce the success case with Groovy and the failure case in Jelly with integration tests in Stapler. From here it should be a small matter of programming to find the solution.

          Basil Crow added a comment -

          (Failing) tests have been added to Stapler in https://github.com/jenkinsci/stapler/pull/352

          If anyone wants to have fun debugging a programming language runtime issue, have at it! Should be "easy" to figure out once you add breakpoints to compare the successful invocation from Groovy vs the unsuccessful invocation from Jelly.

          Any interest in exploring this notmyfault? I can help out as needed.

          Basil Crow added a comment - (Failing) tests have been added to Stapler in https://github.com/jenkinsci/stapler/pull/352 If anyone wants to have fun debugging a programming language runtime issue, have at it! Should be "easy" to figure out once you add breakpoints to compare the successful invocation from Groovy vs the unsuccessful invocation from Jelly. Any interest in exploring this notmyfault ? I can help out as needed.

          Any interest in exploring this Alexander Brandes? I can help out as needed.

          Today was the first day I checked out Stapler to review your PR, I don't know how Jelly or Groovy views actually work under the hood. That may be something for the future when I feel comfortable with these background processes.

          Alexander Brandes added a comment - Any interest in exploring this Alexander Brandes? I can help out as needed. Today was the first day I checked out Stapler to review your PR, I don't know how Jelly or Groovy views actually work under the hood. That may be something for the future when I feel comfortable with these background processes.

            Unassigned Unassigned
            notmyfault Alexander Brandes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: