java.lang.NullPointerException

Jenkins JIRA | floreal | 6 years ago
  1. 0

    Greetings I'd wish tu use it in order to include automated tests reports in my testlink project. However I get an exception when it parses my JUnit report files. I use cucumber with a Custom JUnit formater in order to generate my test reports. Here are my settings: Custom fields: Identifier Test Command: E:\Floreal\jruby-1.5.6\bin\rake features:report case="%TESTLINK_TESTCASE_NAME%" TestLink automated tests key custom field: Identifier JUnit XML report files pattern: reports/TEST-*.xml You will find an attached example of my generated reports And here is a (huge!) screenshot of one of the automated test specs ("Identificateur" is the heaman readable "Identifier" custom Field), see attached image The features:report rake task generates its report under reports/ directory Here is the console output from hudson: {noformat} Démarré par l'utilisateur anonymous Updating file:///E:/Floreal/repositories/ffcam-specs/trunk At revision 10 no change for file:///E:/Floreal/repositories/ffcam-specs/trunk since the previous build Preparing TestLink client API Using TestLink URL: http://192.168.0.100:81/testlink_1_9_0/lib/api/xmlrpc.php Retrieving TestLink details about Test Project, Test Plan and Build. Retrieving list of automated test cases from TestLink Found TestLink Test Case: TestCase [id=301, name=Acceder par la carte, testSuiteId=null, testProjectId=null, authorLogin=null, summary=<p>Verrifier que l'on puisse acc&eacute;der &agrave; la page d'un massif en cliquant par un lien de la carte</p> <table width="200" cellspacing="1" cellpadding="1" border="1"> <caption>Exemples</caption> <thead> <tr> <th scope="col">z</th> <th scope="col">titre</th> </tr> </thead> <tbody> <tr> <td>3</td> <td>Massif du Mercantour</td> </tr> </tbody> </table> <p>&nbsp;</p>, steps=[], preconditions=null, testImportance=null, executionType=2, order=null, internalId=null, checkDuplicatedName=null, actionOnDuplicatedName=null, versionId=302, version=1, parentId=null, customFields=[], executionStatus=null] Automated test case found. Retrieving list of custom fields for test case Retrieving custom field Identifier Custom field Identifier value: Navigation vers les massifs.Acceder par la carte Found TestLink Test Case: TestCase [id=296, name=Acceder par la liste, testSuiteId=null, testProjectId=null, authorLogin=null, summary=<p>Verrifier que l'on puisse acc&eacute;der &agrave; la page d'un massif en cliquant par un lien de la liste</p> <table cellspacing="1" cellpadding="1" border="1" style="width: 301px; height: 63px;"> <caption>Exemples</caption> <thead> <tr> <th scope="col">nom</th> <th scope="col">titre</th> </tr> </thead> <tbody> <tr> <td>Massif du mercantour</td> <td>Massif du Mercantour</td> </tr> </tbody> </table> <p>&nbsp;</p>, steps=[], preconditions=null, testImportance=null, executionType=2, order=null, internalId=null, checkDuplicatedName=null, actionOnDuplicatedName=null, versionId=297, version=1, parentId=null, customFields=[], executionStatus=null] Automated test case found. Retrieving list of custom fields for test case Retrieving custom field Identifier Custom field Identifier value: Navigation vers les massifs.Acceder par la liste Creating list of environment variables for test case execution Merging build environment variables with TestLink environment variables Executing test command [workspace] $ E:\Floreal\Hudson\Service\jobs\ffcam-specs\workspace\testlink_temporary_581989177946588235.bat && exit %%ERRORLEVEL%% (in E:/Floreal/Hudson/Service/jobs/ffcam-specs/workspace) E:/Floreal/jruby-1.5.6/bin/jruby.exe -I "E:/Floreal/jruby-1.5.6/lib/ruby/gems/1.8/gems/cucumber-0.10.0/lib;lib" "E:/Floreal/jruby-1.5.6/lib/ruby/gems/1.8/gems/cucumber-0.10.0/bin/cucumber" features --format JunitAggregate --out ./reports --name "Acceder par la carte" Using the default profile... Creating list of environment variables for test case execution Merging build environment variables with TestLink environment variables Executing test command [workspace] $ E:\Floreal\Hudson\Service\jobs\ffcam-specs\workspace\testlink_temporary_5079789249653728847.bat && exit %%ERRORLEVEL%% (in E:/Floreal/Hudson/Service/jobs/ffcam-specs/workspace) E:/Floreal/jruby-1.5.6/bin/jruby.exe -I "E:/Floreal/jruby-1.5.6/lib/ruby/gems/1.8/gems/cucumber-0.10.0/lib;lib" "E:/Floreal/jruby-1.5.6/lib/ruby/gems/1.8/gems/cucumber-0.10.0/bin/cucumber" features --format JunitAggregate --out ./reports --name "Acceder par la liste" Using the default profile... Scanning for JUnit files in E:\Floreal\Hudson\Service\jobs\ffcam-specs\workspace. Include pattern: reports/TEST-*.xml JUnit file found. Parsing file to extract Test Results FATAL: null java.lang.NullPointerException at hudson.plugins.testlink.parser.JUnitXmlHandler.endElement(JUnitXmlHandler.java:179) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at hudson.plugins.testlink.parser.JUnitParser.parse(JUnitParser.java:136) at hudson.plugins.testlink.parser.JUnitParser.parseFile(JUnitParser.java:75) at hudson.plugins.testlink.parser.Parser.parse(Parser.java:112) at hudson.plugins.testlink.parser.Parser.invoke(Parser.java:137) at hudson.plugins.testlink.parser.Parser.invoke(Parser.java:37) at hudson.FilePath.act(FilePath.java:756) at hudson.FilePath.act(FilePath.java:738) at hudson.plugins.testlink.TestLinkBuilder.perform(TestLinkBuilder.java:508) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603) at hudson.model.Build$RunnerImpl.build(Build.java:172) at hudson.model.Build$RunnerImpl.doRun(Build.java:137) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417) at hudson.model.Run.run(Run.java:1362) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) {noformat} As the message isn't very explicit pheraps you would help me having a clue about what is going wrong? Do you need more informtion that may help you solving this issue? By the way, It worked fine when I tested this plugin with a regular Java project with JUnit reports Best reguards, Floréal

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

    Greetings I'd wish tu use it in order to include automated tests reports in my testlink project. However I get an exception when it parses my JUnit report files. I use cucumber with a Custom JUnit formater in order to generate my test reports. Here are my settings: Custom fields: Identifier Test Command: E:\Floreal\jruby-1.5.6\bin\rake features:report case="%TESTLINK_TESTCASE_NAME%" TestLink automated tests key custom field: Identifier JUnit XML report files pattern: reports/TEST-*.xml You will find an attached example of my generated reports And here is a (huge!) screenshot of one of the automated test specs ("Identificateur" is the heaman readable "Identifier" custom Field), see attached image The features:report rake task generates its report under reports/ directory Here is the console output from hudson: {noformat} Démarré par l'utilisateur anonymous Updating file:///E:/Floreal/repositories/ffcam-specs/trunk At revision 10 no change for file:///E:/Floreal/repositories/ffcam-specs/trunk since the previous build Preparing TestLink client API Using TestLink URL: http://192.168.0.100:81/testlink_1_9_0/lib/api/xmlrpc.php Retrieving TestLink details about Test Project, Test Plan and Build. Retrieving list of automated test cases from TestLink Found TestLink Test Case: TestCase [id=301, name=Acceder par la carte, testSuiteId=null, testProjectId=null, authorLogin=null, summary=<p>Verrifier que l'on puisse acc&eacute;der &agrave; la page d'un massif en cliquant par un lien de la carte</p> <table width="200" cellspacing="1" cellpadding="1" border="1"> <caption>Exemples</caption> <thead> <tr> <th scope="col">z</th> <th scope="col">titre</th> </tr> </thead> <tbody> <tr> <td>3</td> <td>Massif du Mercantour</td> </tr> </tbody> </table> <p>&nbsp;</p>, steps=[], preconditions=null, testImportance=null, executionType=2, order=null, internalId=null, checkDuplicatedName=null, actionOnDuplicatedName=null, versionId=302, version=1, parentId=null, customFields=[], executionStatus=null] Automated test case found. Retrieving list of custom fields for test case Retrieving custom field Identifier Custom field Identifier value: Navigation vers les massifs.Acceder par la carte Found TestLink Test Case: TestCase [id=296, name=Acceder par la liste, testSuiteId=null, testProjectId=null, authorLogin=null, summary=<p>Verrifier que l'on puisse acc&eacute;der &agrave; la page d'un massif en cliquant par un lien de la liste</p> <table cellspacing="1" cellpadding="1" border="1" style="width: 301px; height: 63px;"> <caption>Exemples</caption> <thead> <tr> <th scope="col">nom</th> <th scope="col">titre</th> </tr> </thead> <tbody> <tr> <td>Massif du mercantour</td> <td>Massif du Mercantour</td> </tr> </tbody> </table> <p>&nbsp;</p>, steps=[], preconditions=null, testImportance=null, executionType=2, order=null, internalId=null, checkDuplicatedName=null, actionOnDuplicatedName=null, versionId=297, version=1, parentId=null, customFields=[], executionStatus=null] Automated test case found. Retrieving list of custom fields for test case Retrieving custom field Identifier Custom field Identifier value: Navigation vers les massifs.Acceder par la liste Creating list of environment variables for test case execution Merging build environment variables with TestLink environment variables Executing test command [workspace] $ E:\Floreal\Hudson\Service\jobs\ffcam-specs\workspace\testlink_temporary_581989177946588235.bat && exit %%ERRORLEVEL%% (in E:/Floreal/Hudson/Service/jobs/ffcam-specs/workspace) E:/Floreal/jruby-1.5.6/bin/jruby.exe -I "E:/Floreal/jruby-1.5.6/lib/ruby/gems/1.8/gems/cucumber-0.10.0/lib;lib" "E:/Floreal/jruby-1.5.6/lib/ruby/gems/1.8/gems/cucumber-0.10.0/bin/cucumber" features --format JunitAggregate --out ./reports --name "Acceder par la carte" Using the default profile... Creating list of environment variables for test case execution Merging build environment variables with TestLink environment variables Executing test command [workspace] $ E:\Floreal\Hudson\Service\jobs\ffcam-specs\workspace\testlink_temporary_5079789249653728847.bat && exit %%ERRORLEVEL%% (in E:/Floreal/Hudson/Service/jobs/ffcam-specs/workspace) E:/Floreal/jruby-1.5.6/bin/jruby.exe -I "E:/Floreal/jruby-1.5.6/lib/ruby/gems/1.8/gems/cucumber-0.10.0/lib;lib" "E:/Floreal/jruby-1.5.6/lib/ruby/gems/1.8/gems/cucumber-0.10.0/bin/cucumber" features --format JunitAggregate --out ./reports --name "Acceder par la liste" Using the default profile... Scanning for JUnit files in E:\Floreal\Hudson\Service\jobs\ffcam-specs\workspace. Include pattern: reports/TEST-*.xml JUnit file found. Parsing file to extract Test Results FATAL: null java.lang.NullPointerException at hudson.plugins.testlink.parser.JUnitXmlHandler.endElement(JUnitXmlHandler.java:179) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at hudson.plugins.testlink.parser.JUnitParser.parse(JUnitParser.java:136) at hudson.plugins.testlink.parser.JUnitParser.parseFile(JUnitParser.java:75) at hudson.plugins.testlink.parser.Parser.parse(Parser.java:112) at hudson.plugins.testlink.parser.Parser.invoke(Parser.java:137) at hudson.plugins.testlink.parser.Parser.invoke(Parser.java:37) at hudson.FilePath.act(FilePath.java:756) at hudson.FilePath.act(FilePath.java:738) at hudson.plugins.testlink.TestLinkBuilder.perform(TestLinkBuilder.java:508) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603) at hudson.model.Build$RunnerImpl.build(Build.java:172) at hudson.model.Build$RunnerImpl.doRun(Build.java:137) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417) at hudson.model.Run.run(Run.java:1362) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) {noformat} As the message isn't very explicit pheraps you would help me having a clue about what is going wrong? Do you need more informtion that may help you solving this issue? By the way, It worked fine when I tested this plugin with a regular Java project with JUnit reports Best reguards, Floréal

    Jenkins JIRA | 6 years ago | floreal
    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 hudson.plugins.testlink.parser.JUnitXmlHandler.endElement()
    2. hudson.plugins.testlink
      JUnitXmlHandler.endElement
      1. hudson.plugins.testlink.parser.JUnitXmlHandler.endElement(JUnitXmlHandler.java:179)
      1 frame
    3. Java RT
      SAXParser.parse
      1. com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
      2. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      3. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
      4. com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
      5. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      6. com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      7. com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      8. com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      9. com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      10. com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      11. javax.xml.parsers.SAXParser.parse(Unknown Source)
      12. javax.xml.parsers.SAXParser.parse(Unknown Source)
      12 frames
    4. hudson.plugins.testlink
      Parser.invoke
      1. hudson.plugins.testlink.parser.JUnitParser.parse(JUnitParser.java:136)
      2. hudson.plugins.testlink.parser.JUnitParser.parseFile(JUnitParser.java:75)
      3. hudson.plugins.testlink.parser.Parser.parse(Parser.java:112)
      4. hudson.plugins.testlink.parser.Parser.invoke(Parser.java:137)
      5. hudson.plugins.testlink.parser.Parser.invoke(Parser.java:37)
      5 frames
    5. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:756)
      2. hudson.FilePath.act(FilePath.java:738)
      2 frames
    6. hudson.plugins.testlink
      TestLinkBuilder.perform
      1. hudson.plugins.testlink.TestLinkBuilder.perform(TestLinkBuilder.java:508)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603)
      3. hudson.model.Build$RunnerImpl.build(Build.java:172)
      4. hudson.model.Build$RunnerImpl.doRun(Build.java:137)
      5. hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417)
      6. hudson.model.Run.run(Run.java:1362)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:145)
      9 frames