java.lang.NullPointerException

Jenkins JIRA | ricardoyepex | 6 years ago
  1. 0

    I've followed the steps on http://leanjavaengineering.wordpress.com/2010/08/25/grails-codenarc-hudson/ and I'm getting an ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.lang.NullPointerException. Console Output View as plain text Started by user anonymous [workspace] $ grails clean Welcome to Grails 1.3.5 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /opt/install/grails Base Directory: /home/tek/.hudson/jobs/myapp/workspace Resolving dependencies... Dependencies resolved in 4923ms. Running script /opt/install/grails/scripts/Clean.groovy Environment set to development [delete] Deleting: /home/tek/.grails/1.3.5/projects/workspace/resources/web.xml [delete] Deleting directory /home/tek/.hudson/jobs/myapp/workspace/target/classes [delete] Deleting directory /home/tek/.grails/1.3.5/projects/workspace/plugin-classes [delete] Deleting directory /home/tek/.grails/1.3.5/projects/workspace/resources [delete] Deleting directory /home/tek/.hudson/jobs/myapp/workspace/target/test-classes [workspace] $ grails test-app Welcome to Grails 1.3.5 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /opt/install/grails Base Directory: /home/tek/.hudson/jobs/myapp/workspace Resolving dependencies... Dependencies resolved in 5055ms. Running script /opt/install/grails/scripts/TestApp.groovy Environment set to test [mkdir] Created dir: /home/tek/.grails/1.3.5/projects/workspace/plugin-classes [groovyc] Compiling 32 source files to /home/tek/.grails/1.3.5/projects/workspace/plugin-classes Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. [mkdir] Created dir: /home/tek/.hudson/jobs/myapp/workspace/target/classes [groovyc] Compiling 8 source files to /home/tek/.hudson/jobs/myapp/workspace/target/classes [copy] Copied 4 empty directories to 2 empty directories under /home/tek/.grails/1.3.5/projects/workspace/resources [copy] Copied 7 empty directories to 6 empty directories under /home/tek/.grails/1.3.5/projects/workspace/resources [copy] Copied 2 empty directories to 2 empty directories under /home/tek/.grails/1.3.5/projects/workspace/resources [copy] Copied 2 empty directories to 2 empty directories under /home/tek/.grails/1.3.5/projects/workspace/resources [mkdir] Created dir: /home/tek/.hudson/jobs/myapp/workspace/target/test-reports/html [mkdir] Created dir: /home/tek/.hudson/jobs/myapp/workspace/target/test-reports/plain Starting unit test phase ... [mkdir] Created dir: /home/tek/.hudson/jobs/myapp/workspace/target/test-classes/unit Starting integration test phase ... [copy] Copying 1 file to /home/tek/.hudson/jobs/myapp/workspace/target/test-classes/integration [copy] Copying 1 file to /home/tek/.hudson/jobs/myapp/workspace/target/test-classes [mkdir] Created dir: /home/tek/.grails/1.3.5/projects/workspace/resources/grails-app/i18n [native2ascii] Converting 13 files from /home/tek/.hudson/jobs/myapp/workspace/grails-app/i18n to /home/tek/.grails/1.3.5/projects/workspace/resources/grails-app/i18n [mkdir] Created dir: /home/tek/.grails/1.3.5/projects/workspace/resources/plugins/code-coverage-1.1.8/grails-app/i18n [native2ascii] Converting 1 file from /home/tek/.grails/1.3.5/projects/workspace/plugins/code-coverage-1.1.8/grails-app/i18n to /home/tek/.grails/1.3.5/projects/workspace/resources/plugins/code-coverage-1.1.8/grails-app/i18n [mkdir] Created dir: /home/tek/.grails/1.3.5/projects/workspace/resources/plugins/codenarc-0.7/grails-app/i18n [native2ascii] Converting 1 file from /home/tek/.grails/1.3.5/projects/workspace/plugins/codenarc-0.7/grails-app/i18n to /home/tek/.grails/1.3.5/projects/workspace/resources/plugins/codenarc-0.7/grails-app/i18n [copy] Copying 1 file to /home/tek/.hudson/jobs/myapp/workspace/target/classes Starting other test phase ... [junitreport] Processing /home/tek/.hudson/jobs/myapp/workspace/target/test-reports/TESTS-TestSuites.xml to /tmp/null1784349293 [junitreport] Loading stylesheet /opt/install/grails/lib/junit-frames.xsl [junitreport] Transform time: 5212ms [junitreport] Deleting: /tmp/null1784349293 Tests PASSED - view reports in target/test-reports Application context shutting down... Application context shutdown. [workspace] $ grails codenarc Welcome to Grails 1.3.5 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /opt/install/grails Base Directory: /home/tek/.hudson/jobs/myapp/workspace Resolving dependencies... Dependencies resolved in 6465ms. Running script /home/tek/.grails/1.3.5/projects/workspace/plugins/codenarc-0.7/scripts/Codenarc.groovy Environment set to development Running CodeNarc ... CodeNarc completed: (p1=0; p2=1; p3=58) 8666ms CodeNarc finished; report generated: target/test-reports/CodeNarcReport.xml ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.lang.NullPointerException at hudson.plugins.violations.generate.OutputFileModel.doViolation(OutputFileModel.java:198) at hudson.plugins.violations.generate.OutputFileModel.createLimited(OutputFileModel.java:113) at hudson.plugins.violations.generate.OutputFileModel.execute(OutputFileModel.java:80) at hudson.plugins.violations.generate.ExecuteFilePath.execute(ExecuteFilePath.java:45) at hudson.plugins.violations.generate.GenerateXML.execute(GenerateXML.java:47) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:124) 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:1303) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:137) Finished: FAILURE

    Jenkins JIRA | 6 years ago | ricardoyepex
    java.lang.NullPointerException
  2. 0

    I've followed the steps on http://leanjavaengineering.wordpress.com/2010/08/25/grails-codenarc-hudson/ and I'm getting an ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.lang.NullPointerException. Console Output View as plain text Started by user anonymous [workspace] $ grails clean Welcome to Grails 1.3.5 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /opt/install/grails Base Directory: /home/tek/.hudson/jobs/myapp/workspace Resolving dependencies... Dependencies resolved in 4923ms. Running script /opt/install/grails/scripts/Clean.groovy Environment set to development [delete] Deleting: /home/tek/.grails/1.3.5/projects/workspace/resources/web.xml [delete] Deleting directory /home/tek/.hudson/jobs/myapp/workspace/target/classes [delete] Deleting directory /home/tek/.grails/1.3.5/projects/workspace/plugin-classes [delete] Deleting directory /home/tek/.grails/1.3.5/projects/workspace/resources [delete] Deleting directory /home/tek/.hudson/jobs/myapp/workspace/target/test-classes [workspace] $ grails test-app Welcome to Grails 1.3.5 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /opt/install/grails Base Directory: /home/tek/.hudson/jobs/myapp/workspace Resolving dependencies... Dependencies resolved in 5055ms. Running script /opt/install/grails/scripts/TestApp.groovy Environment set to test [mkdir] Created dir: /home/tek/.grails/1.3.5/projects/workspace/plugin-classes [groovyc] Compiling 32 source files to /home/tek/.grails/1.3.5/projects/workspace/plugin-classes Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. [mkdir] Created dir: /home/tek/.hudson/jobs/myapp/workspace/target/classes [groovyc] Compiling 8 source files to /home/tek/.hudson/jobs/myapp/workspace/target/classes [copy] Copied 4 empty directories to 2 empty directories under /home/tek/.grails/1.3.5/projects/workspace/resources [copy] Copied 7 empty directories to 6 empty directories under /home/tek/.grails/1.3.5/projects/workspace/resources [copy] Copied 2 empty directories to 2 empty directories under /home/tek/.grails/1.3.5/projects/workspace/resources [copy] Copied 2 empty directories to 2 empty directories under /home/tek/.grails/1.3.5/projects/workspace/resources [mkdir] Created dir: /home/tek/.hudson/jobs/myapp/workspace/target/test-reports/html [mkdir] Created dir: /home/tek/.hudson/jobs/myapp/workspace/target/test-reports/plain Starting unit test phase ... [mkdir] Created dir: /home/tek/.hudson/jobs/myapp/workspace/target/test-classes/unit Starting integration test phase ... [copy] Copying 1 file to /home/tek/.hudson/jobs/myapp/workspace/target/test-classes/integration [copy] Copying 1 file to /home/tek/.hudson/jobs/myapp/workspace/target/test-classes [mkdir] Created dir: /home/tek/.grails/1.3.5/projects/workspace/resources/grails-app/i18n [native2ascii] Converting 13 files from /home/tek/.hudson/jobs/myapp/workspace/grails-app/i18n to /home/tek/.grails/1.3.5/projects/workspace/resources/grails-app/i18n [mkdir] Created dir: /home/tek/.grails/1.3.5/projects/workspace/resources/plugins/code-coverage-1.1.8/grails-app/i18n [native2ascii] Converting 1 file from /home/tek/.grails/1.3.5/projects/workspace/plugins/code-coverage-1.1.8/grails-app/i18n to /home/tek/.grails/1.3.5/projects/workspace/resources/plugins/code-coverage-1.1.8/grails-app/i18n [mkdir] Created dir: /home/tek/.grails/1.3.5/projects/workspace/resources/plugins/codenarc-0.7/grails-app/i18n [native2ascii] Converting 1 file from /home/tek/.grails/1.3.5/projects/workspace/plugins/codenarc-0.7/grails-app/i18n to /home/tek/.grails/1.3.5/projects/workspace/resources/plugins/codenarc-0.7/grails-app/i18n [copy] Copying 1 file to /home/tek/.hudson/jobs/myapp/workspace/target/classes Starting other test phase ... [junitreport] Processing /home/tek/.hudson/jobs/myapp/workspace/target/test-reports/TESTS-TestSuites.xml to /tmp/null1784349293 [junitreport] Loading stylesheet /opt/install/grails/lib/junit-frames.xsl [junitreport] Transform time: 5212ms [junitreport] Deleting: /tmp/null1784349293 Tests PASSED - view reports in target/test-reports Application context shutting down... Application context shutdown. [workspace] $ grails codenarc Welcome to Grails 1.3.5 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /opt/install/grails Base Directory: /home/tek/.hudson/jobs/myapp/workspace Resolving dependencies... Dependencies resolved in 6465ms. Running script /home/tek/.grails/1.3.5/projects/workspace/plugins/codenarc-0.7/scripts/Codenarc.groovy Environment set to development Running CodeNarc ... CodeNarc completed: (p1=0; p2=1; p3=58) 8666ms CodeNarc finished; report generated: target/test-reports/CodeNarcReport.xml ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.lang.NullPointerException at hudson.plugins.violations.generate.OutputFileModel.doViolation(OutputFileModel.java:198) at hudson.plugins.violations.generate.OutputFileModel.createLimited(OutputFileModel.java:113) at hudson.plugins.violations.generate.OutputFileModel.execute(OutputFileModel.java:80) at hudson.plugins.violations.generate.ExecuteFilePath.execute(ExecuteFilePath.java:45) at hudson.plugins.violations.generate.GenerateXML.execute(GenerateXML.java:47) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:124) 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:1303) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:137) Finished: FAILURE

    Jenkins JIRA | 6 years ago | ricardoyepex
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    I had Gendarme 2.10 installed and was working with violations plugin, however I upgraded to 2.11 I suddenly got the following error: ERROR: Build step failed with exception java.lang.NullPointerException at hudson.plugins.violations.types.gendarme.GendarmeParser.parseViolations(GendarmeParser.java:181) at hudson.plugins.violations.types.gendarme.GendarmeParser.parse(GendarmeParser.java:74) at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:187) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:114) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:25) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Report Violations' marked build as failure Downgrading back to gendarme 2.10 fixes the problem

    Jenkins JIRA | 6 months ago | Matt P
    java.lang.NullPointerException
  5. 0

    I had Gendarme 2.10 installed and was working with violations plugin, however I upgraded to 2.11 I suddenly got the following error: ERROR: Build step failed with exception java.lang.NullPointerException at hudson.plugins.violations.types.gendarme.GendarmeParser.parseViolations(GendarmeParser.java:181) at hudson.plugins.violations.types.gendarme.GendarmeParser.parse(GendarmeParser.java:74) at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:187) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:114) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:25) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Report Violations' marked build as failure Downgrading back to gendarme 2.10 fixes the problem

    Jenkins JIRA | 6 months ago | Matt P
    java.lang.NullPointerException

    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.generate.OutputFileModel.doViolation()
    2. hudson.plugins.violations
      ViolationsCollector.invoke
      1. hudson.plugins.violations.generate.OutputFileModel.doViolation(OutputFileModel.java:198)
      2. hudson.plugins.violations.generate.OutputFileModel.createLimited(OutputFileModel.java:113)
      3. hudson.plugins.violations.generate.OutputFileModel.execute(OutputFileModel.java:80)
      4. hudson.plugins.violations.generate.ExecuteFilePath.execute(ExecuteFilePath.java:45)
      5. hudson.plugins.violations.generate.GenerateXML.execute(GenerateXML.java:47)
      6. hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:124)
      7. hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27)
      7 frames
    3. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:753)
      2. hudson.FilePath.act(FilePath.java:735)
      2 frames
    4. hudson.plugins.violations
      ViolationsPublisher.perform
      1. hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74)
      1 frame
    5. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      3. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580)
      4. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558)
      5. hudson.model.Build$RunnerImpl.post2(Build.java:157)
      6. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
      7. hudson.model.Run.run(Run.java:1303)
      8. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      9. hudson.model.ResourceController.execute(ResourceController.java:88)
      10. hudson.model.Executor.run(Executor.java:137)
      10 frames