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

PMD analysis crash when project is build on different slaves

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: analysis-core-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.413
      PMD plugin 3.16
      Static Analysis Collector Plug-in 1.14
      Static Analysis Utilities 1.20
      Running on RedHat 5
    • Similar Issues:

      Description

      The server has access to multiple slave nodes to build the job (slave agent launched on Unix machines through SSH). When a maven2 job that uses PMD Analysis report in its configuration lands on a slave where it did not ran the time before we get the following error right at the start of the compilation.

      PMDSuccessfully parsed file /slave1/workspace/project_name/target/pmd.xml of module Project Name with 0 warnings.
      [PMD] File encoding has not been set in pom.xml, using platform encoding UTF-8, i.e. build is platform dependent (see <a href="http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding">Maven FAQ</a>).
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] No reference build found for project_name » Project Name #14
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.util.NoSuchElementException: No reference build found for project_name » Project Name #14
      at hudson.plugins.analysis.core.BuildHistory.getReferenceBuild(BuildHistory.java:93)
      at hudson.plugins.analysis.core.BuildHistory.hasReferenceBuild(BuildHistory.java:105)
      at hudson.plugins.analysis.core.BuildResult.initialize(BuildResult.java:284)
      at hudson.plugins.analysis.core.BuildResult.<init>(BuildResult.java:218)
      at hudson.plugins.pmd.PmdResult.<init>(PmdResult.java:34)
      at hudson.plugins.pmd.PmdReporterResult.<init>(PmdReporterResult.java:28)
      at hudson.plugins.pmd.PmdReporter.createResult(PmdReporter.java:122)
      at hudson.plugins.pmd.PmdReporter.createResult(PmdReporter.java:27)
      at hudson.plugins.analysis.core.HealthAwareReporter$1.call(HealthAwareReporter.java:250)
      at hudson.plugins.analysis.core.HealthAwareReporter$1.call(HealthAwareReporter.java:248)
      at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:396)
      at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:469)
      at sun.reflect.GeneratedMethodAccessor365.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at hudson.model.Executor$1.call(Executor.java:429)
      at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
      at $Proxy31.execute(Unknown Source)
      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 hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:270)
      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)

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          Fixed in analysis-core 1.21.

          Show
          drulli Ulli Hafner added a comment - Fixed in analysis-core 1.21.
          Hide
          drulli Ulli Hafner added a comment -

          It will take some time until the release is propagated to the update center. (You can download and install manually if required: http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jvnet/hudson/plugins/analysis-core/1.21/)

          Show
          drulli Ulli Hafner added a comment - It will take some time until the release is propagated to the update center. (You can download and install manually if required: http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jvnet/hudson/plugins/analysis-core/1.21/ )

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              atriku Bruno L
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: