java.lang.NullPointerException

Jenkins JIRA | Robert Hancock | 5 years ago
  1. 0

    When using FindBugs 2.0.0, and the fb-contrib plugin is enabled, the Jenkins plugin gets an NPE when parsing the resulting XML file, causing the build to fail: [FINDBUGS] Collecting findbugs analysis files... ERROR: Publisher hudson.plugins.findbugs.FindBugsPublisher aborted due to exception java.lang.NullPointerException at edu.umd.cs.findbugs.Project.setPluginStatus(Project.java:130) at edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:384) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:356) at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:327) at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:314) at hudson.plugins.findbugs.parser.FindBugsParser.readXml(FindBugsParser.java:263) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:206) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:143) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:103) at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:358) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:317) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:266) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) at hudson.FilePath.act(FilePath.java:756) at hudson.FilePath.act(FilePath.java:738) at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:158) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:338) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:662) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:638) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:616) at hudson.model.Build$RunnerImpl.post2(Build.java:161) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:585) at hudson.model.Run.run(Run.java:1398) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) [WARNINGS] Skipping publisher since build result is FAILURE The plugin section of the XML file looks something like this: <?xml version="1.0" encoding="UTF-8"?> <BugCollection version="2.0.0" sequence="0" timestamp="1325796064745" analysisTimestamp="1325796064756" release=""> <Project projectName=""> .... <Plugin id="com.mebigfatguy.fbcontrib" enabled="true"/> </Project>

    Jenkins JIRA | 5 years ago | Robert Hancock
    java.lang.NullPointerException
  2. 0

    When using FindBugs 2.0.0, and the fb-contrib plugin is enabled, the Jenkins plugin gets an NPE when parsing the resulting XML file, causing the build to fail: [FINDBUGS] Collecting findbugs analysis files... ERROR: Publisher hudson.plugins.findbugs.FindBugsPublisher aborted due to exception java.lang.NullPointerException at edu.umd.cs.findbugs.Project.setPluginStatus(Project.java:130) at edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:384) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:356) at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:327) at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:314) at hudson.plugins.findbugs.parser.FindBugsParser.readXml(FindBugsParser.java:263) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:206) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:143) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:103) at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:358) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:317) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:266) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) at hudson.FilePath.act(FilePath.java:756) at hudson.FilePath.act(FilePath.java:738) at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:158) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:338) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:662) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:638) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:616) at hudson.model.Build$RunnerImpl.post2(Build.java:161) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:585) at hudson.model.Run.run(Run.java:1398) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) [WARNINGS] Skipping publisher since build result is FAILURE The plugin section of the XML file looks something like this: <?xml version="1.0" encoding="UTF-8"?> <BugCollection version="2.0.0" sequence="0" timestamp="1325796064745" analysisTimestamp="1325796064756" release=""> <Project projectName=""> .... <Plugin id="com.mebigfatguy.fbcontrib" enabled="true"/> </Project>

    Jenkins JIRA | 5 years ago | Robert Hancock
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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 edu.umd.cs.findbugs.Project.setPluginStatus()
    2. jOpenDocument
      SAXBugCollectionHandler.startElement
      1. edu.umd.cs.findbugs.Project.setPluginStatus(Project.java:130)
      2. edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:384)
      2 frames
    3. Xerces2-j
      AbstractSAXParser.parse
      1. org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
      2. org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
      3. org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
      4. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      5. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      6. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      7. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      8. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      9. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      9 frames
    4. jOpenDocument
      SortedBugCollection.readXML
      1. edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:356)
      2. edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:327)
      3. edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:314)
      3 frames
    5. hudson.plugins.findbugs
      FindBugsParser.parse
      1. hudson.plugins.findbugs.parser.FindBugsParser.readXml(FindBugsParser.java:263)
      2. hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:206)
      3. hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:143)
      4. hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:103)
      4 frames
    6. Static Analysis Utilities
      FilesParser.invoke
      1. hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:358)
      2. hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:317)
      3. hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:266)
      4. hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      4 frames
    7. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:756)
      2. hudson.FilePath.act(FilePath.java:738)
      2 frames
    8. hudson.plugins.findbugs
      FindBugsPublisher.perform
      1. hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:158)
      1 frame
    9. Static Analysis Utilities
      HealthAwarePublisher.perform
      1. hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:338)
      1 frame
    10. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
      2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:662)
      3. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:638)
      4. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:616)
      5. hudson.model.Build$RunnerImpl.post2(Build.java:161)
      6. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:585)
      7. hudson.model.Run.run(Run.java:1398)
      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