org.xml.sax.SAXException: Input stream is not a PMD file.

Jenkins JIRA | Xavier Carol | 2 years ago
  1. 0

    I'm trying to parse results of PMD execution with PMD plugin but I'm getting this error: 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:323) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:281) at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:232) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:201) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.plugins.pmd.PmdPublisher.perform(PmdPublisher.java:142) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:152) at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:347) 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:1743) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Command line execution from within a Execute Shell code block for PMD version 5.2.3 is: /opt/pmd-bin-5.2.3/bin/run.sh cpd --minimum-tokens 100 --files files-dir --language cpp --format xml --encoding UTF8 > pmd.xml Command line execution from within a Execute Shell code block for PMD version 4.2.6 is: java -cp /opt/pmd-bin-4.2.6/lib/asm-3.2.jar:/opt/pmd-bin-4.2.6/lib/jaxen-1.1.1.jar:/opt/pmd-bin-4.2.6/lib/junit-4.4.jar:/opt/pmd-bin-4.2.6/lib/pmd-4.2.6.jar net.sourceforge.pmd.cpd.CPD --minimum-tokens 100 --files segmenter/ --language cpp --format xml > pmd.xml Please find attached the pmd.xml output file. I'm not sure if this is a bug or I'm doying something wrong, but I cannot find a solution to this problem.

    Jenkins JIRA | 2 years ago | Xavier Carol
    org.xml.sax.SAXException: Input stream is not a PMD file.
  2. 0

    I'm trying to parse results of PMD execution with PMD plugin but I'm getting this error: 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:323) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:281) at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:232) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:201) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.plugins.pmd.PmdPublisher.perform(PmdPublisher.java:142) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:152) at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:347) 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:1743) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Command line execution from within a Execute Shell code block for PMD version 5.2.3 is: /opt/pmd-bin-5.2.3/bin/run.sh cpd --minimum-tokens 100 --files files-dir --language cpp --format xml --encoding UTF8 > pmd.xml Command line execution from within a Execute Shell code block for PMD version 4.2.6 is: java -cp /opt/pmd-bin-4.2.6/lib/asm-3.2.jar:/opt/pmd-bin-4.2.6/lib/jaxen-1.1.1.jar:/opt/pmd-bin-4.2.6/lib/junit-4.4.jar:/opt/pmd-bin-4.2.6/lib/pmd-4.2.6.jar net.sourceforge.pmd.cpd.CPD --minimum-tokens 100 --files segmenter/ --language cpp --format xml > pmd.xml Please find attached the pmd.xml output file. I'm not sure if this is a bug or I'm doying something wrong, but I cannot find a solution to this problem.

    Jenkins JIRA | 2 years ago | Xavier Carol
    org.xml.sax.SAXException: Input stream is not a PMD file.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Maven Eclipse plugin installation

    Stack Overflow | 5 years ago | ziggy
    org.eclipse.core.runtime.CoreException: Error parsing site stream. [The XML stream is not a valid default "site.xml" file. The root tag is not site.]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.xml.sax.SAXException

      Input stream is not a PMD file.

      at hudson.plugins.pmd.parser.PmdParser.parse()
    2. PMD Plug-in
      PmdParser.parse
      1. hudson.plugins.pmd.parser.PmdParser.parse(PmdParser.java:72)
      1 frame
    3. Static Analysis Utilities
      FilesParser.invoke
      1. hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:54)
      2. hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:323)
      3. hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:281)
      4. hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:232)
      5. hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:201)
      6. hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      6 frames
    4. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:989)
      2. hudson.FilePath.act(FilePath.java:967)
      2 frames
    5. PMD Plug-in
      PmdPublisher.perform
      1. hudson.plugins.pmd.PmdPublisher.perform(PmdPublisher.java:142)
      1 frame
    6. Static Analysis Utilities
      HealthAwareRecorder.perform
      1. hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:152)
      2. hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:347)
      2 frames
    7. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
      4. hudson.model.Build$BuildExecution.post2(Build.java:183)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
      6. hudson.model.Run.execute(Run.java:1743)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:89)
      9. hudson.model.Executor.run(Executor.java:240)
      9 frames