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

PMD Plugin : Parsing failed due to org.xml.sax.SAXException: Input stream is not a PMD file

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: pmd-plugin
    • Labels:
    • Environment:
      Windows 7 E, 64 bit | Jenkins v2.33 |analysis-collector-1.49| pmd plugin- 3.46 | apache-ant-1.9.4| jdk-1.7.0-60 | Static analysis utilities 1.81|Web Browser- Chrome | pmd 5.5.2
    • Similar Issues:

      Description

      Hi,
      I am trying to publish PMD Analysis report , but i get the following error in the console output. Also whats strange is that the report file generated is weird a combination of pmd rule set and the warnings generated. I am attaching the report as well and snapshots of pmd_report.xml as generated in jenkins workspace.
      If i generate the report through ant I get the prefect pmd_report.xml generated.

      Total time: 6 seconds
      [PMD] Collecting PMD analysis files...
      [PMD] Finding all files that match the pattern pmd_report.xml
      [PMD] Parsing 1 file in /opt/.../jenkins-v2/workspace/Code Analysis
      [PMD] Parsing of file /opt/...jenkinsv2/jenkins-v2/workspace/Code Analysis/pmd_report.xml failed due to an exception:

      org.xml.sax.SAXException: Input stream is not a PMD file.
      at hudson.plugins.pmd.parser.PmdParser.parse(PmdParser.java:72)
      at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:54)
      at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:325)
      at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:283)
      at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:234)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:203)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      at hudson.FilePath.act(FilePath.java:996)
      at hudson.FilePath.act(FilePath.java:974)
      at hudson.plugins.pmd.PmdPublisher.perform(PmdPublisher.java:76)
      at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:68)
      at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:295)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      at hudson.model.Build$BuildExecution.post2(Build.java:185)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
      at hudson.model.Run.execute(Run.java:1753)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)

        Attachments

        1. Capture.PNG
          Capture.PNG
          52 kB
        2. Capture2.PNG
          Capture2.PNG
          129 kB
        3. pmd_report.xml
          406 kB

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          You did feed the plugin with an HTML report. But you need to create an XML report.

          Show
          drulli Ulli Hafner added a comment - You did feed the plugin with an HTML report. But you need to create an XML report.
          Hide
          s_sharma S Sharma added a comment -

          Bingo! Thanks a lot.

          Show
          s_sharma S Sharma added a comment - Bingo! Thanks a lot.

            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: