hudson.util.IOException2: Cannot parse ipb-grails/CodeNarc-Report.xml

Jenkins JIRA | Jan Karstens | 6 years ago
  1. 0

    Running the target 'grails codenarc' on the central build server produces as expected a codenarc XML file with violations of coding conventions (see attached file). However, the post build task 'Report Violations' fails to parse the XML file. In the build log I see the following NPE trace: ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception hudson.util.IOException2: Cannot parse ipb-grails/CodeNarc-Report.xml at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:64) at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27) at hudson.FilePath.act(FilePath.java:756) at hudson.FilePath.act(FilePath.java:738) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:603) at hudson.model.Build$RunnerImpl.post2(Build.java:161) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572) at hudson.model.Run.run(Run.java:1386) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) Caused by: java.lang.NullPointerException at hudson.plugins.violations.model.Violation.compareTo(Violation.java:192) at hudson.plugins.violations.model.Violation.compareTo(Violation.java:8) at java.util.TreeMap.put(TreeMap.java:562) at java.util.TreeSet.add(TreeSet.java:255) at hudson.plugins.violations.model.FullFileModel.addViolation(FullFileModel.java:24) at hudson.plugins.violations.types.codenarc.CodenarcParser.parseFileElement(CodenarcParser.java:90) at hudson.plugins.violations.types.codenarc.CodenarcParser.execute(CodenarcParser.java:47) at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:59) ... 16 more

    Jenkins JIRA | 6 years ago | Jan Karstens
    hudson.util.IOException2: Cannot parse ipb-grails/CodeNarc-Report.xml
  2. 0

    Running the target 'grails codenarc' on the central build server produces as expected a codenarc XML file with violations of coding conventions (see attached file). However, the post build task 'Report Violations' fails to parse the XML file. In the build log I see the following NPE trace: ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception hudson.util.IOException2: Cannot parse ipb-grails/CodeNarc-Report.xml at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:64) at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27) at hudson.FilePath.act(FilePath.java:756) at hudson.FilePath.act(FilePath.java:738) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:603) at hudson.model.Build$RunnerImpl.post2(Build.java:161) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572) at hudson.model.Run.run(Run.java:1386) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) Caused by: java.lang.NullPointerException at hudson.plugins.violations.model.Violation.compareTo(Violation.java:192) at hudson.plugins.violations.model.Violation.compareTo(Violation.java:8) at java.util.TreeMap.put(TreeMap.java:562) at java.util.TreeSet.add(TreeSet.java:255) at hudson.plugins.violations.model.FullFileModel.addViolation(FullFileModel.java:24) at hudson.plugins.violations.types.codenarc.CodenarcParser.parseFileElement(CodenarcParser.java:90) at hudson.plugins.violations.types.codenarc.CodenarcParser.execute(CodenarcParser.java:47) at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:59) ... 16 more

    Jenkins JIRA | 6 years ago | Jan Karstens
    hudson.util.IOException2: Cannot parse ipb-grails/CodeNarc-Report.xml
  3. 0

    hudson codenarc issue

    Stack Overflow | 6 years ago | DonX
    hudson.util.IOException2: Cannot parse CodeNarcReport.xml
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    problem of generating an xml for codenar with hudson

    Google Groups | 6 years ago | ensienne
    hudson.util.IOException2: Cannot parse CodeNarcReport.xml
  6. 0

    I've just started to use CodeNarc and Violations, and I can't make it work. I get error in hudson job when it's trying to parse CodeNarc xml report: ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception hudson.util.IOException2: Cannot parse target/test-reports/CodeNarcReport.xml at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:64) at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558) at hudson.model.Build$RunnerImpl.post2(Build.java:157) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1348) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:139) Caused by: java.lang.NullPointerException at hudson.plugins.violations.model.Violation.compareTo(Violation.java:192) at hudson.plugins.violations.model.Violation.compareTo(Violation.java:8) at java.util.TreeMap.put(TreeMap.java:545) at java.util.TreeSet.add(TreeSet.java:238) at hudson.plugins.violations.model.FullFileModel.addViolation(FullFileModel.java:24) at hudson.plugins.violations.types.codenarc.CodenarcParser.parseFileElement(CodenarcParser.java:90) at hudson.plugins.violations.types.codenarc.CodenarcParser.execute(CodenarcParser.java:47) at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:59) ... 16 more It's the same with faux path set or not set.

    Jenkins JIRA | 6 years ago | peterr
    hudson.util.IOException2: Cannot parse target/test-reports/CodeNarcReport.xml

    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. java.lang.NullPointerException

      No message provided

      at hudson.plugins.violations.model.Violation.compareTo()
    2. hudson.plugins.violations
      Violation.compareTo
      1. hudson.plugins.violations.model.Violation.compareTo(Violation.java:192)
      2. hudson.plugins.violations.model.Violation.compareTo(Violation.java:8)
      2 frames
    3. Java RT
      TreeSet.add
      1. java.util.TreeMap.put(TreeMap.java:562)
      2. java.util.TreeSet.add(TreeSet.java:255)
      2 frames
    4. hudson.plugins.violations
      ViolationsCollector.invoke
      1. hudson.plugins.violations.model.FullFileModel.addViolation(FullFileModel.java:24)
      2. hudson.plugins.violations.types.codenarc.CodenarcParser.parseFileElement(CodenarcParser.java:90)
      3. hudson.plugins.violations.types.codenarc.CodenarcParser.execute(CodenarcParser.java:47)
      4. hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:59)
      5. hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189)
      6. hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116)
      7. hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27)
      7 frames
    5. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:756)
      2. hudson.FilePath.act(FilePath.java:738)
      2 frames
    6. hudson.plugins.violations
      ViolationsPublisher.perform
      1. hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649)
      3. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625)
      4. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:603)
      5. hudson.model.Build$RunnerImpl.post2(Build.java:161)
      6. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572)
      7. hudson.model.Run.run(Run.java:1386)
      8. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      9. hudson.model.ResourceController.execute(ResourceController.java:88)
      10. hudson.model.Executor.run(Executor.java:145)
      10 frames