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

loginLink.jelly JellyTagException

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.638, linux, JDK 1.8
    • Similar Issues:

      Description

      A problem is occurring when attempting to start a job using REST API. To reproduce simply curl the following to the the job:

      curl -i -X POST http://username:password@jenkins.server.address/job/ia-sample-job/build

      This results in:

      org.apache.commons.jelly.JellyTagException: jar:file:/mnt/jenkins/tomcat/webapps/jenkins/WEB-INF/lib/jenkins-core-1.638.jar!/hudson/security/SecurityRealm/loginLink.jelly:28:78: <j:invokeStatic> Could not load class: java.net.URLEncoder. Reason: java.lang.NoSuchMethodException: java.net.URLEncoder.encode(java.lang.Object, java.lang.String)
      	at org.apache.commons.jelly.tags.core.InvokeStaticTag.createLoadClassFailedException(InvokeStaticTag.java:177)
      	at org.apache.commons.jelly.tags.core.InvokeStaticTag.doTag(InvokeStaticTag.java:139)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	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.IncludeTag.doTag(IncludeTag.java:147)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	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.IncludeTag.doTag(IncludeTag.java:147)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      	at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      	at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	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.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	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:95)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      	at hudson.init.impl.InstallUncaughtExceptionHandler$1.reportException(InstallUncaughtExceptionHandler.java:27)
      	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:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
      	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:142)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
      	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)
      Caused by: java.lang.NoSuchMethodException: java.net.URLEncoder.encode(java.lang.Object, java.lang.String)
      	at java.lang.Class.getMethod(Class.java:1786)
      	at org.apache.commons.jelly.tags.core.InvokeStaticTag.doTag(InvokeStaticTag.java:124)
      	... 68 more
      

      This occurs here:

       <j:invokeStatic var="from" className="java.net.URLEncoder" method="encode">
          <j:arg value="${if (request.session.attribute('from')!=null) request.session.getAttribute('from');  else if (request.getParameter('from')!=null) request.getParameter('from'); else if (request.requestURI=='/loginError' || request.requestURI=='/login') '/'; else request.requestURI;}"/>
          <j:arg value="UTF-8"/>
        </j:invokeStatic>
      

      I'm guessing somehow the above results in it evaluating to the branch of if that doesn't produce a String which never gets hit otherwise.

        Attachments

          Activity

          Hide
          intelradoux intelradoux added a comment -

          Hello,

          Got the same issue when I try to launch a build with parameter without parameter.

          Anyway, I write a (quick) fix and propose a merge request ( https://github.com/jenkinsci/jenkins/pull/1931 )

          It will remove the technical error from the response (showing the business error), but there will be some remaining error in server log because of session usage after sending data to client.

          I did not take time to track those.

          Show
          intelradoux intelradoux added a comment - Hello, Got the same issue when I try to launch a build with parameter without parameter. Anyway, I write a (quick) fix and propose a merge request ( https://github.com/jenkinsci/jenkins/pull/1931 ) It will remove the technical error from the response (showing the business error), but there will be some remaining error in server log because of session usage after sending data to client. I did not take time to track those.
          Hide
          pajasoft Pavel Janoušek added a comment - - edited

          The whole CLI is affected as well.

          I'm a bit curious because I'm aware of two different scenarios with completely different result.

          I. If I use a JENKINS_HOME from the past (let's say rolling for a year), I can't hit this issue.

          II. If I use a completely clean JENKINS_HOME instance (the best is a new directory, start Jenkins from the war (JENKINS_HOME=newdir java -jar jenkins.war) and follow the Jenkins install wizard), this issue manifests itself.

          If I forced the argument type to java.lang.String, method encode(String, String) has found but NPE occurred because the first String input parameter was null.

          The question is why the result of the expression:

          ${if (request.session.attribute('from')!=null) request.session.getAttribute('from');  else if (request.getParameter('from')!=null) request.getParameter('from'); else if (request.requestURI=='/loginError' || request.requestURI=='/login') '/'; else request.requestURI;

          is null in the case of the completely new clean Jenkins instance.

          Show
          pajasoft Pavel Janoušek added a comment - - edited The whole CLI is affected as well. I'm a bit curious because I'm aware of two different scenarios with completely different result. I. If I use a JENKINS_HOME from the past (let's say rolling for a year), I can't hit this issue. II. If I use a completely clean JENKINS_HOME instance (the best is a new directory, start Jenkins from the war ( JENKINS_HOME=newdir java -jar jenkins.war ) and follow the Jenkins install wizard), this issue manifests itself. If I forced the argument type to java.lang.String , method encode(String, String) has found but NPE occurred because the first String input parameter was null. The question is why the result of the expression: ${ if (request.session.attribute( 'from' )!= null ) request.session.getAttribute( 'from' ); else if (request.getParameter( 'from' )!= null ) request.getParameter( 'from' ); else if (request.requestURI== '/loginError' || request.requestURI== '/login' ) '/' ; else request.requestURI; is null in the case of the completely new clean Jenkins instance.
          Hide
          pajasoft Pavel Janoušek added a comment -

          Anyway above proposed fix doesn't work because for this command:

          java -jar war/target/jenkins/WEB-INF/jenkins-cli.jar -s http://admin:paja@127.0.0.1:8080/ version
          

          I'm getting this response:

          May 05, 2016 2:00:55 PM hudson.remoting.SynchronousCommandTransport$ReaderThread run
          SEVERE: I/O error in channel Chunked connection to http://admin:paja@127.0.0.1:8080/cli
          java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
                  at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
                  at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
                  at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
                  at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
                  at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
          
          hudson.remoting.RequestAbortedException: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
                  at hudson.remoting.Request.abort(Request.java:303)
                  at hudson.remoting.Channel.terminate(Channel.java:847)
                  at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:69)
                  at ......remote call to Chunked connection to http://admin:paja@127.0.0.1:8080/cli(Native Method)
                  at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
                  at hudson.remoting.Request.call(Request.java:172)
                  at hudson.remoting.Channel.call(Channel.java:780)
                  at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:250)
                  at hudson.remoting.$Proxy1.waitForProperty(Unknown Source)
                  at hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1258)
                  at hudson.cli.CLI.<init>(CLI.java:141)
                  at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
                  at hudson.cli.CLI._main(CLI.java:473)
                  at hudson.cli.CLI.main(CLI.java:384)
          Caused by: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
                  at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
                  at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
                  at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
                  at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
                  at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
          

          and console on server side says:

          May 05, 2016 2:00:55 PM hudson.ExpressionFactory2$JexlExpression evaluate
          WARNING: Caught exception evaluating: request.getSession() in /cli. Reason: java.lang.IllegalStateException: Response is committed
          java.lang.IllegalStateException: Response is committed
                  at org.eclipse.jetty.server.Request.getSession(Request.java:1400)
                  at org.eclipse.jetty.server.Request.getSession(Request.java:1378)
                  at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:279)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:606)
                  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:95)
                  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
                  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
                  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:52)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
                  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
                  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
                  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
                  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
                  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
                  at org.eclipse.jetty.server.Server.handle(Server.java:499)
                  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
                  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
                  at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
                  at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                  at java.lang.Thread.run(Thread.java:745)
          
          Show
          pajasoft Pavel Janoušek added a comment - Anyway above proposed fix doesn't work because for this command: java -jar war/target/jenkins/WEB-INF/jenkins-cli.jar -s http: //admin:paja@127.0.0.1:8080/ version I'm getting this response: May 05, 2016 2:00:55 PM hudson.remoting.SynchronousCommandTransport$ReaderThread run SEVERE: I/O error in channel Chunked connection to http: //admin:paja@127.0.0.1:8080/cli java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299) at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48) hudson.remoting.RequestAbortedException: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A at hudson.remoting.Request.abort(Request.java:303) at hudson.remoting.Channel.terminate(Channel.java:847) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:69) at ......remote call to Chunked connection to http: //admin:paja@127.0.0.1:8080/cli(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.Request.call(Request.java:172) at hudson.remoting.Channel.call(Channel.java:780) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:250) at hudson.remoting.$Proxy1.waitForProperty(Unknown Source) at hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1258) at hudson.cli.CLI.<init>(CLI.java:141) at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72) at hudson.cli.CLI._main(CLI.java:473) at hudson.cli.CLI.main(CLI.java:384) Caused by: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299) at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48) and console on server side says: May 05, 2016 2:00:55 PM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: request.getSession() in /cli. Reason: java.lang.IllegalStateException: Response is committed java.lang.IllegalStateException: Response is committed at org.eclipse.jetty.server.Request.getSession(Request.java:1400) at org.eclipse.jetty.server.Request.getSession(Request.java:1378) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:279) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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:95) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) 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:52) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang. Thread .run( Thread .java:745)
          Hide
          pajasoft Pavel Janoušek added a comment - - edited

          PR sent to fix this issue without much rewriting of the original code - the app. logic was rewritten and moved back to the Java side.

          Show
          pajasoft Pavel Janoušek added a comment - - edited PR sent to fix this issue without much rewriting of the original code - the app. logic was rewritten and moved back to the Java side.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ing. Pavel Janousek
          Path:
          core/src/main/java/hudson/security/SecurityRealm.java
          core/src/main/resources/hudson/security/SecurityRealm/loginLink.jelly
          http://jenkins-ci.org/commit/jenkins/6c6f34cd6495a481af8bc54119e2c658d88d1edb
          Log:
          JENKINS-31618 Fixed NoSuchMethodException in loginLink.jelly

          The logic is moved from template back to Java and modified to fix the issue.
          The argorithm is rewritten for better legibility.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ing. Pavel Janousek Path: core/src/main/java/hudson/security/SecurityRealm.java core/src/main/resources/hudson/security/SecurityRealm/loginLink.jelly http://jenkins-ci.org/commit/jenkins/6c6f34cd6495a481af8bc54119e2c658d88d1edb Log: JENKINS-31618 Fixed NoSuchMethodException in loginLink.jelly The logic is moved from template back to Java and modified to fix the issue. The argorithm is rewritten for better legibility.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          core/src/main/java/hudson/security/SecurityRealm.java
          core/src/main/resources/hudson/security/SecurityRealm/loginLink.jelly
          http://jenkins-ci.org/commit/jenkins/782804f38e39aeda20fdb5e3d7c1abeb9b95a099
          Log:
          Merge pull request #2312 from pjanouse/JENKINS-31618

          JENKINS-31618 Fixed NoSuchMethodException in loginLink.jelly

          Compare: https://github.com/jenkinsci/jenkins/compare/ebb84da617a9...782804f38e39

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/src/main/java/hudson/security/SecurityRealm.java core/src/main/resources/hudson/security/SecurityRealm/loginLink.jelly http://jenkins-ci.org/commit/jenkins/782804f38e39aeda20fdb5e3d7c1abeb9b95a099 Log: Merge pull request #2312 from pjanouse/ JENKINS-31618 JENKINS-31618 Fixed NoSuchMethodException in loginLink.jelly Compare: https://github.com/jenkinsci/jenkins/compare/ebb84da617a9...782804f38e39
          Hide
          pajasoft Pavel Janoušek added a comment -

          Merged

          Show
          pajasoft Pavel Janoušek added a comment - Merged
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Released as Jenkins-2.4

          Show
          oleg_nenashev Oleg Nenashev added a comment - Released as Jenkins-2.4
          Hide
          kamran kamran kamran added a comment -

          Working with Jenkins-2.4.. i see the issue

          Attached image :

          
          java.lang.RuntimeException: org.apache.commons.jelly.JellyTagException: jar:file:/C:/Program%20Files%20(x86)/Jenkins/war/WEB-INF/lib/jenkins-core-2.7.4.jar!/lib/layout/layout.jelly:258:25: <d:invokeBody> org.apache.commons.jelly.JellyTagException: jar:file:/C:/Program%20Files%20(x86)/Jenkins/war/WEB-INF/lib/jenkins-core-2.7.4.jar!/lib/layout/main-panel.jelly:36:21: <d:invokeBody> org.apache.commons.jelly.JellyTagException: Cannot get property 'escapeTestDescp' on null object
          	at org.kohsuke.stapler.jelly.groovy.JellyBuilder.doInvokeMethod(JellyBuilder.java:280)
          	at org.kohsuke.stapler.jelly.groovy.Namespace$ProxyImpl.invoke(Namespace.java:92)
          	at com.sun.proxy.$Proxy59.layout(Unknown Source)
          	at lib.LayoutTagLib$layout.call(Unknown Source)
          	at hudson.plugins.testng.results.MethodResult.index.run(index.groovy:8)
          	at org.kohsuke.stapler.jelly.groovy.GroovierJellyScript.run(GroovierJellyScript.java:74)
          	at org.kohsuke.stapler.jelly.groovy.GroovierJellyScript.run(GroovierJellyScript.java:62)
          	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.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:55)
          	at org.kohsuke.stapler.jelly.groovy.GroovyFacet.handleIndexRequest(GroovyFacet.java:121)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:735)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          	at org.kohsuke.stapler.MetaClass$11.dispat
          
          
          Show
          kamran kamran kamran added a comment - Working with Jenkins-2.4.. i see the issue Attached image : java.lang.RuntimeException: org.apache.commons.jelly.JellyTagException: jar:file:/C:/Program%20Files%20(x86)/Jenkins/war/WEB-INF/lib/jenkins-core-2.7.4.jar!/lib/layout/layout.jelly:258:25: <d:invokeBody> org.apache.commons.jelly.JellyTagException: jar:file:/C:/Program%20Files%20(x86)/Jenkins/war/WEB-INF/lib/jenkins-core-2.7.4.jar!/lib/layout/main-panel.jelly:36:21: <d:invokeBody> org.apache.commons.jelly.JellyTagException: Cannot get property 'escapeTestDescp' on null object at org.kohsuke.stapler.jelly.groovy.JellyBuilder.doInvokeMethod(JellyBuilder.java:280) at org.kohsuke.stapler.jelly.groovy.Namespace$ProxyImpl.invoke(Namespace.java:92) at com.sun.proxy.$Proxy59.layout(Unknown Source) at lib.LayoutTagLib$layout.call(Unknown Source) at hudson.plugins.testng.results.MethodResult.index.run(index.groovy:8) at org.kohsuke.stapler.jelly.groovy.GroovierJellyScript.run(GroovierJellyScript.java:74) at org.kohsuke.stapler.jelly.groovy.GroovierJellyScript.run(GroovierJellyScript.java:62) 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.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:55) at org.kohsuke.stapler.jelly.groovy.GroovyFacet.handleIndexRequest(GroovyFacet.java:121) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:735) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$11.dispat
          Hide
          pajasoft Pavel Janoušek added a comment -

          kamran kamran

          Based on your report, you were working with Jenkins-2.7.4, not 2.4.
          I can't find property escapeTestDescp defined nor used in Jenkins-core anywhere. Could you try your scenario with the clean Jenkins deployment if it still occurs? Probably it is incorporated from some plugin you have installed into your deployment (TestNG plug-in?), so is should be fixed there.

          Please provide feedback or more info about your setup. Thank you. Pavel

          Show
          pajasoft Pavel Janoušek added a comment - kamran kamran Based on your report, you were working with Jenkins-2.7.4, not 2.4. I can't find property escapeTestDescp defined nor used in Jenkins-core anywhere. Could you try your scenario with the clean Jenkins deployment if it still occurs? Probably it is incorporated from some plugin you have installed into your deployment (TestNG plug-in?), so is should be fixed there. Please provide feedback or more info about your setup. Thank you. Pavel
          Hide
          pajasoft Pavel Janoušek added a comment -

          The culprit is really TestNG plug-in here. Looks like testngProjAction is unexceptionally NULL.

          Show
          pajasoft Pavel Janoušek added a comment - The culprit is really TestNG plug-in here . Looks like testngProjAction is unexceptionally NULL.
          Hide
          pajasoft Pavel Janoušek added a comment -

          kamran kamran
          Your different issue is reported as JENKINS-38661, I thing we can close this one.

          Show
          pajasoft Pavel Janoušek added a comment - kamran kamran Your different issue is reported as JENKINS-38661 , I thing we can close this one.
          Hide
          gauravk Gaurav Khandelwal added a comment -

          Hello Team,

          We are getting similar exception while executing multiple plans in Jenkins. Jenkins version - 2.46.3.

          Error Summary:

          org.apache.commons.jelly.JellyTagException: jar:file:/C:/Bitnami/jenkins-*2.46.3*-0/apache-tomcat/webapps/jenkins/WEB-INF/lib/jenkins-core-2.46.3.jar!/lib/layout/layout.jelly:259:25: <d:invokeBody> org.apache.commons.jelly.JellyTagException: jar:file:/C:/Bitnami/jenkins-2.46.3-0/apache-tomcat/webapps/jenkins/WEB-INF/lib/jenkins-core-2.46.3.jar!/lib/layout/main-panel.jelly:36:21: <d:invokeBody> org.apache.commons.jelly.JellyTagException: Cannot get property 'escapeExceptionMsg' on null object.

           

          Will appreciate, any idea on resolution or work-around.

           

          Thanks in Advance!

          Show
          gauravk Gaurav Khandelwal added a comment - Hello Team, We are getting similar exception while executing multiple plans in Jenkins. Jenkins version - 2.46.3. Error Summary: org.apache.commons.jelly.JellyTagException: jar: file:/C:/Bitnami/jenkins-*2.46.3*-0/apache-tomcat/webapps/jenkins/WEB-INF/lib/jenkins-core-2.46.3.jar!/lib/layout/layout.jelly:259:25: <d:invokeBody> org.apache.commons.jelly.JellyTagException: jar: file:/C:/Bitnami/jenkins-2.46.3-0/apache-tomcat/webapps/jenkins/WEB-INF/lib/jenkins-core-2.46.3.jar!/lib/layout/main-panel.jelly:36:21: <d:invokeBody> org.apache.commons.jelly.JellyTagException: Cannot get property 'escapeExceptionMsg' on null object.   Will appreciate, any idea on resolution or work-around.   Thanks in Advance!
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Gaurav Khandelwal it does not look to be similar. Please create a new issue and attach a full stacktrace.

          Show
          oleg_nenashev Oleg Nenashev added a comment - Gaurav Khandelwal it does not look to be similar. Please create a new issue and attach a full stacktrace.

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              anthonybsd Anthony Guselnikov
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: