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

NPE in cobertura publisher while cobertura is not configured anymore on the project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Platform: All, OS: All

      I am not sure what exactly happened as I am not the one who played with hudson's
      config.

      I think someone tried to enable the cobertura plugin on a project, then removed
      it. Then the project stopped building with the following exception.

      [INFO] Trace
      java.lang.NullPointerException
      at
      hudson.plugins.cobertura.CoberturaProjectAction.<init>(CoberturaProjectAction.java:27)
      at
      hudson.plugins.cobertura.MavenCoberturaPublisher.getProjectAction(MavenCoberturaPublisher.java:198)
      at hudson.maven.MavenModule.addTransientActionsFromBuild(MavenModule.java:396)
      at hudson.maven.MavenModule.addTransientActionsFromBuild(MavenModule.java:68)
      at
      hudson.maven.AbstractMavenProject.updateTransientActions(AbstractMavenProject.java:57)
      at hudson.maven.MavenModuleSet.updateTransientActions(MavenModuleSet.java:179)
      at hudson.maven.MavenModuleSetBuild.notifyModuleBuild(MavenModuleSetBuild.java:288)
      at hudson.maven.MavenBuild$ProxyImpl2.end(MavenBuild.java:386)
      at sun.reflect.GeneratedMethodAccessor554.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
      hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:263)
      at
      hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:246)
      at
      hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:206)
      at hudson.remoting.UserRequest.perform(UserRequest.java:92)
      at hudson.remoting.UserRequest.perform(UserRequest.java:46)
      at hudson.remoting.Request$2.run(Request.java:236)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at
      java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)

      Looking at the configure page, cobertura wasn't enabled, so I restarted hudson.
      Now the project is missing and in the hudson console log, I can find:

      WARNING: Failed to load /home/hudson/.hudson/jobs/ABD-trunk
      java.lang.NullPointerException
      at
      hudson.plugins.cobertura.CoberturaProjectAction.<init>(CoberturaProjectAction.java:27)
      at
      hudson.plugins.cobertura.MavenCoberturaPublisher.getProjectAction(MavenCoberturaPublisher.java:198)
      at
      hudson.maven.MavenModule.addTransientActionsFromBuild(MavenModule.java:396)
      at
      hudson.maven.MavenModule.addTransientActionsFromBuild(MavenModule.java:68)
      at
      hudson.maven.AbstractMavenProject.updateTransientActions(AbstractMavenProject.java:57)
      at hudson.model.AbstractProject.onLoad(AbstractProject.java:199)
      at hudson.maven.MavenModule.onLoad(MavenModule.java:180)
      at hudson.model.Items.load(Items.java:110)
      at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:58)
      at hudson.maven.MavenModuleSet.onLoad(MavenModuleSet.java:356)
      at hudson.model.Items.load(Items.java:110)
      at hudson.model.Hudson.load(Hudson.java:1866)
      at hudson.model.Hudson.<init>(Hudson.java:519)
      at hudson.WebAppMain$2.run(WebAppMain.java:190)

      What's funny is that /home/hudson/.hudson/jobs/ABD-trunk/config.xml doesn't
      contain any reference to the cobertura plugin. Here is the publishers section:

      <publishers>
      <hudson.maven.RedeployPublisher>
      <id>snapshots</id>
      <url>http://deesse.bbc.no:8081/nexus/content/repositories/snapshots</url>
      <uniqueVersion>false</uniqueVersion>
      </hudson.maven.RedeployPublisher>
      <hudson.tasks.BuildTrigger>
      <childProjects>ABD-trunk-it</childProjects>
      <threshold>
      <name>SUCCESS</name>
      <ordinal>0</ordinal>
      <color>BLUE</color>
      </threshold>
      </hudson.tasks.BuildTrigger>
      </publishers>

      Another project does but this one loads properly.

      Filling issue with core as I feel the problem is more of hudson somewhat
      incorrectly dispatching the configs or maybe the project parameter, or something
      like that.

      Using hudson 1.291

            mindless Alan Harder
            lacostej lacostej
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: