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

Adding PMD plugin gives javax.servlet.ServletException: java.lang.NoSuchFieldError: VALIDATE_ANT_FILE_MASK_BOUND

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: pmd-plugin
    • Labels:
    • Environment:
      Windows 7 E, 64 bit | Jenkins v1.581 | analysis-core-1.79 |analysis-collector-1.41| pmd- 3.45 | apache-ant-1.9.4| jdk-1.7.0-60 | Static analysis utilities-1.79 |Web Browser- Chrome | pmd 5.5.2
    • Similar Issues:

      Description

      Hi,
      I am trying to publish PMD analysis report published by my ANT script in freestyle project(jenkins job). The ANT Script runs successfully and i can see the warnings generated in the pmd.xml file in my jenkins workspace folder .The pmd report is saved as pmd.xml in the root of workspace.
      Also, when I configure the settings of the job, i see an ERROR right away after i add publish PMD report in Post build actions. The stack trace has been attached along with the console output for pmd.

      What I tried: Downgrading to Static Analysis Utilities 1.60. with no success in resolving the issue.

      Update: I tried build again, without any changes but it gives me different stack trace on console from first output (attached):
      (second build console output )
      Total time: 2 seconds
      [PMD] Collecting PMD analysis files...
      ERROR: Publisher hudson.plugins.pmd.PmdPublisher aborted due to exception
      java.lang.NoClassDefFoundError: jenkins/MasterToSlaveFileCallable
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
      at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1138)
      at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:756)
      at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1309)
      at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
      at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
      at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at jenkins.ClassLoaderReflectionToolkit.invoke(ClassLoaderReflectionToolkit.java:44)
      at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:86)
      at hudson.ClassicPluginStrategy$DependencyClassLoader.findClass(ClassicPluginStrategy.java:634)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      at jenkins.util.AntClassLoader.findBaseClass(AntClassLoader.java:1397)
      at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1074)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      at hudson.plugins.pmd.PmdPublisher.perform(PmdPublisher.java:80)
      at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:68)
      at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:280)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
      at hudson.model.Run.execute(Run.java:1770)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)
      Caused by: java.lang.ClassNotFoundException: jenkins.MasterToSlaveFileCallable
      at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1375)
      at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
      at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 31 more
      Finished: FAILURE

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          I think your installation is too old: please update Jenkins and the analysis plugins. (required core >= 1.625.1)

          Show
          drulli Ulli Hafner added a comment - I think your installation is too old: please update Jenkins and the analysis plugins. (required core >= 1.625.1)
          Hide
          s_sharma S Sharma added a comment -

          Ulli Hafner Thanks for looking into the issue. By analysis core you mean Static Analysis Utilities? I have 1.80 now and i was working on 1.79 before.

          Show
          s_sharma S Sharma added a comment - Ulli Hafner Thanks for looking into the issue. By analysis core you mean Static Analysis Utilities? I have 1.80 now and i was working on 1.79 before.
          Hide
          s_sharma S Sharma added a comment -

          Ulli Hafner Thats right. Just the update to new Jenkins fixed the issue. Thanks very much!

          Show
          s_sharma S Sharma added a comment - Ulli Hafner Thats right. Just the update to new Jenkins fixed the issue. Thanks very much!
          Hide
          s_sharma S Sharma added a comment -

          Upgrading to new version of Jenkins was the fix.

          Show
          s_sharma S Sharma added a comment - Upgrading to new version of Jenkins was the fix.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              s_sharma S Sharma
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: