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

NullPointer while tagging a build

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: cvs-tag-plugin
    • Labels:
      None
    • Environment:
      Platform: PC, OS: Windows XP
    • Similar Issues:

      Description

      I'm getting this error when try to tag a build selecting the option "Tag all
      upstream builds at once".

      I'm using:

      • tomcat 6.0.18
      • Hudson 1.322.
      • I have 5 upstream builds to be tagged.

      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:73)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:485)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:309)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:485)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:309)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:485)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:179)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:485)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:403)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:116)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      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:166)
      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
      hudson.security.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:112)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:155)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.NullPointerException
      at hudson.scm.CVSSCM$TagAction.doSubmit(CVSSCM.java:1409)
      ... 53 more
      02/09/2009 11:53:35 org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet Stapler threw exception
      java.lang.NullPointerException
      at hudson.scm.CVSSCM$TagAction.doSubmit(CVSSCM.java:1409)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:73)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:485)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:309)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:485)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:309)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:485)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:179)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:485)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:403)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:116)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      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:166)
      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
      hudson.security.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:112)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:155)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)

        Attachments

          Issue Links

            Activity

            Hide
            mindless Alan Harder added a comment -

            So, I found that the code creating the form you see in your browser calls "build.getTransitiveUpstreamBuilds()", but the code processing the submitted form uses "build.getUpstreamBuilds()" to locate things.. not knowing much else about what is going on here, I suspect this results in the NPE. I'm changing the form processing to also use getTransitiveUpstreamBuilds, also handling NPE better and giving an error message in case this doesn't fix it. I'll mark the issue as resolved.. reopen it and provide a new stack trace if there is still an issue using CVS plugin 1.2.

            Show
            mindless Alan Harder added a comment - So, I found that the code creating the form you see in your browser calls "build.getTransitiveUpstreamBuilds()", but the code processing the submitted form uses "build.getUpstreamBuilds()" to locate things.. not knowing much else about what is going on here, I suspect this results in the NPE. I'm changing the form processing to also use getTransitiveUpstreamBuilds, also handling NPE better and giving an error message in case this doesn't fix it. I'll mark the issue as resolved.. reopen it and provide a new stack trace if there is still an issue using CVS plugin 1.2.
            Hide
            mindless Alan Harder added a comment -

            r33087 | mindless | 2010-07-20 17:12:44 -0600 (Tue, 20 Jul 2010)
            Changed paths:
            M /trunk/hudson/plugins/cvs/pom.xml
            M /trunk/hudson/plugins/cvs/src/main/java/hudson/scm/CVSSCM.java
            M /trunk/hudson/plugins/cvs/src/main/resources/hudson/scm/cvs/Messages.properties

            [cvs] [FIXED JENKINS-4374] tagForm.jelly uses transitiveUpstreamBuilds to create the form
            for "tag all upstream builds", but the code processing this used getUpstreamBuilds() to
            locale the builds.. so it was possible for builds to not be found, resulting in NPE.
            Changed processing to also use getTransitiveUpstreamBuilds, and also better handling
            to avoid NPE if something really isn't found.

            Show
            mindless Alan Harder added a comment - r33087 | mindless | 2010-07-20 17:12:44 -0600 (Tue, 20 Jul 2010) Changed paths: M /trunk/hudson/plugins/cvs/pom.xml M /trunk/hudson/plugins/cvs/src/main/java/hudson/scm/CVSSCM.java M /trunk/hudson/plugins/cvs/src/main/resources/hudson/scm/cvs/Messages.properties [cvs] [FIXED JENKINS-4374] tagForm.jelly uses transitiveUpstreamBuilds to create the form for "tag all upstream builds", but the code processing this used getUpstreamBuilds() to locale the builds.. so it was possible for builds to not be found, resulting in NPE. Changed processing to also use getTransitiveUpstreamBuilds, and also better handling to avoid NPE if something really isn't found.
            Hide
            fernandor fernandor added a comment - - edited

            I've been busy and I could not look at this issue before. But I'm sorry to say that we still can not "Tag all upstream builds at once". Actually we can not tag a build at all.

            Whenever we try to tag a build it shows us a message saying "Marcação está em progresso:" (meaning Tagging is in progress) and a button saying "Limpar erro para tentar novamente" (meaning Clear erros and try again). Moreover we get no log errors neither tag in the source code.

            Let me ask you 2 questions:
            1. This functionality should tag all sources or only those that have been changed? What we need is tag all project. In other words, all files including those that have not been changed.
            2. How do you guys tag a build using hudson? I've been wondering.. or we are using hudson in the wrong way or nobody else tag versions in the source code.

            Right now we are using:

            • Tomcat 7.0.2
            • Hudson 1.381
            • CVS plugin 1.2
            Show
            fernandor fernandor added a comment - - edited I've been busy and I could not look at this issue before. But I'm sorry to say that we still can not "Tag all upstream builds at once". Actually we can not tag a build at all. Whenever we try to tag a build it shows us a message saying "Marcação está em progresso:" (meaning Tagging is in progress) and a button saying "Limpar erro para tentar novamente" (meaning Clear erros and try again). Moreover we get no log errors neither tag in the source code. Let me ask you 2 questions: 1. This functionality should tag all sources or only those that have been changed? What we need is tag all project. In other words, all files including those that have not been changed. 2. How do you guys tag a build using hudson? I've been wondering.. or we are using hudson in the wrong way or nobody else tag versions in the source code. Right now we are using: Tomcat 7.0.2 Hudson 1.381 CVS plugin 1.2
            Hide
            mindless Alan Harder added a comment -

            1. should tag all
            2. I admit I've had trouble with tagging from the hudson subversion plugin, so I always tag myself from cmdline.. would be nice if the in-hudson feature worked well though, for cvs and svn..

            From what I can tell in the src, the screen with "Tagging is in progress" should show output from the cvs tag command and several other status messages about what it's doing.. the "Clear error to retry" button is only there when the operation is done.. so the fact you see this right away and with no log output is quite odd.

            Show
            mindless Alan Harder added a comment - 1. should tag all 2. I admit I've had trouble with tagging from the hudson subversion plugin, so I always tag myself from cmdline.. would be nice if the in-hudson feature worked well though, for cvs and svn.. From what I can tell in the src, the screen with "Tagging is in progress" should show output from the cvs tag command and several other status messages about what it's doing.. the "Clear error to retry" button is only there when the operation is done.. so the fact you see this right away and with no log output is quite odd.
            Hide
            mindless Alan Harder added a comment -

            I'm reclosing this issue since the NPE should be resolved. Please file a new issue for the general tagging problem, and collect as much info as you can about it (I know, it's not showing you much/anything..). Thanks!

            Show
            mindless Alan Harder added a comment - I'm reclosing this issue since the NPE should be resolved. Please file a new issue for the general tagging problem, and collect as much info as you can about it (I know, it's not showing you much/anything..). Thanks!

              People

              • Assignee:
                mindless Alan Harder
                Reporter:
                fernandor fernandor
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: