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

PMD Plugins Fails parsing loose.dtd

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: pmd-plugin
    • Labels:
    • Environment:
      Windows 7 Premium, JDK 6(lastest update)
    • Similar Issues:

      Description

      When running the pmd plugin as a action post build the pluging fails parsing the pmd report output with the following error message:

      org.xml.sax.SAXParseException; systemId: http://www.w3.org/TR/html4/loose.dtd; lineNumber: 31; columnNumber: 3; La declaraciĆ³n para la entidad "HTML.Version" debe finalizar en '>'.
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at org.apache.commons.digester3.Digester.parse(Digester.java:1642)
      at org.apache.commons.digester3.Digester.parse(Digester.java:1701)
      at hudson.plugins.pmd.parser.PmdParser.parse(PmdParser.java:70)
      at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:53)
      at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306)
      at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
      at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      at hudson.FilePath.act(FilePath.java:909)
      at hudson.FilePath.act(FilePath.java:882)
      at hudson.plugins.pmd.PmdPublisher.perform(PmdPublisher.java:139)
      at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:144)
      at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:754)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:707)
      at hudson.model.Run.execute(Run.java:1629)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)

      The text "La declaraciĆ³n para la entidad "HTML.Version" debe finalizar en '>'" means in english:"The declaration for the entity "HTML.Version" must end with '>'"

        Attachments

          Activity

          Hide
          saija Julian Borrero added a comment -

          xml file generated by the pmd Ant task.

          Show
          saija Julian Borrero added a comment - xml file generated by the pmd Ant task.
          Hide
          drulli Ulli Hafner added a comment -

          Hmm, I can parse the file without any problems. Did you specify the correct pattern? I wonder where that DTD is referenced...

          Show
          drulli Ulli Hafner added a comment - Hmm, I can parse the file without any problems. Did you specify the correct pattern? I wonder where that DTD is referenced...
          Hide
          saija Julian Borrero added a comment -

          the xslt used by pmd to convert the xml of the output to html, here it's referenced the dtd:

          <xsl:output method="html" encoding="UTF-8" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
          doctype-system="http://www.w3.org/TR/html4/loose.dtd" indent="yes"/>

          Show
          saija Julian Borrero added a comment - the xslt used by pmd to convert the xml of the output to html, here it's referenced the dtd: <xsl:output method="html" encoding="UTF-8" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd" indent="yes"/>
          Hide
          drulli Ulli Hafner added a comment -

          But what pattern did you specify? Did you specify the xslt as results file? You need to specify **/pmd_report.xml.

          Show
          drulli Ulli Hafner added a comment - But what pattern did you specify? Did you specify the xslt as results file? You need to specify **/pmd_report.xml.
          Hide
          saija Julian Borrero added a comment -

          Ulli the pattern I just specified it's report/pmd/pmd_report.xml and now it worked!

          [PMD] Collecting PMD analysis files...
          [PMD] Finding all files that match the pattern report/pmd/pmd_report.xml
          [PMD] Parsing 1 files in C:\Program Files (x86)\Jenkins\workspace\xxxxxxx
          [PMD] Successfully parsed file C:\Program Files (x86)\Jenkins\workspace\xxxxxxx\report\pmd\pmd_report.xml of module with 3380 warnings.
          [PMD] Computing warning deltas based on reference build #4

          Show
          saija Julian Borrero added a comment - Ulli the pattern I just specified it's report/pmd/pmd_report.xml and now it worked! [PMD] Collecting PMD analysis files... [PMD] Finding all files that match the pattern report/pmd/pmd_report.xml [PMD] Parsing 1 files in C:\Program Files (x86)\Jenkins\workspace\xxxxxxx [PMD] Successfully parsed file C:\Program Files (x86)\Jenkins\workspace\xxxxxxx\report\pmd\pmd_report.xml of module with 3380 warnings. [PMD] Computing warning deltas based on reference build #4

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              saija Julian Borrero
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: