java.lang.NullPointerException

Jenkins JIRA | damoxc | 6 years ago
  1. 0

    When parsing Gendarme violations I ran into this error: ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.lang.NullPointerException at hudson.plugins.violations.types.gendarme.GendarmeParser.parseViolations(GendarmeParser.java:180) at hudson.plugins.violations.types.gendarme.GendarmeParser.parse(GendarmeParser.java:73) 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$FileCallableWrapper.call(FilePath.java:1899) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) After looking at the code I'm unsure as to how it could happen since there doesn't seem any way for fileName or filePath to become null, I'm quite happy to investigate further with a bit of guidance. Is there anyway I can directly test parsing one of the XML files, without running it via Hudson? I can't really post them here as it's for all internal code unfortunately.

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

    When parsing Gendarme violations I ran into this error: ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.lang.NullPointerException at hudson.plugins.violations.types.gendarme.GendarmeParser.parseViolations(GendarmeParser.java:180) at hudson.plugins.violations.types.gendarme.GendarmeParser.parse(GendarmeParser.java:73) 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$FileCallableWrapper.call(FilePath.java:1899) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) After looking at the code I'm unsure as to how it could happen since there doesn't seem any way for fileName or filePath to become null, I'm quite happy to investigate further with a bit of guidance. Is there anyway I can directly test parsing one of the XML files, without running it via Hudson? I can't really post them here as it's for all internal code unfortunately.

    Jenkins JIRA | 6 years ago | damoxc
    java.lang.NullPointerException
  3. 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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  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 | 5 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.types.gendarme.GendarmeParser.parseViolations()
    2. hudson.plugins.violations
      ViolationsCollector.invoke
      1. hudson.plugins.violations.types.gendarme.GendarmeParser.parseViolations(GendarmeParser.java:180)
      2. hudson.plugins.violations.types.gendarme.GendarmeParser.parse(GendarmeParser.java:73)
      3. hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189)
      4. hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116)
      5. hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27)
      5 frames
    3. Hudson
      FilePath$FileCallableWrapper.call
      1. hudson.FilePath$FileCallableWrapper.call(FilePath.java:1899)
      1 frame
    4. Hudson :: Remoting Layer
      Request$2.run
      1. hudson.remoting.UserRequest.perform(UserRequest.java:114)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:270)
      3 frames
    5. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      2. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      3. java.util.concurrent.FutureTask.run(Unknown Source)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      6. java.lang.Thread.run(Unknown Source)
      6 frames