[ http://jira.codehaus.org/browse/SUREFIRE-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_121419 ]
fabrizio giustina commented on SUREFIRE-444: -------------------------------------------- Looks like that on org.apache.maven.surefire.testng.TestNGReporter.onTestFailure( ITestResult result ) the ITestResult can also not have an attached throwable. Debugging the previous failure I find out the the problem was in a setup method and TestNG is not providing any useful information for the error except for the method name. Avoiding the previous NPE is simple enough, though...We should add a check in PojoStackTraceWriter.writeTraceToString() > NPE in PojoStackTraceWriter.writeTraceToString > ---------------------------------------------- > > Key: SUREFIRE-444 > URL: http://jira.codehaus.org/browse/SUREFIRE-444 > Project: Maven Surefire > Issue Type: Bug > Components: report plugin > Affects Versions: 2.4 > Environment: Maven 2.0.8, Java 6 on Ubuntu 7.10 > Reporter: fabrizio giustina > > The following stacktrace is generated on a project with TestNG tests, happens > with the latest version of surefire (also with the 2.4.1 candidate) > Running TestSuite > org.apache.maven.surefire.booter.SurefireExecutionException: null; nested > exception is java.lang.NullPointerException: null > java.lang.NullPointerException > at > org.apache.maven.surefire.report.PojoStackTraceWriter.writeTraceToString(PojoStackTraceWriter.java:51) > at > org.apache.maven.surefire.report.PojoStackTraceWriter.writeTrimmedTraceToString(PojoStackTraceWriter.java:58) > at > org.apache.maven.surefire.report.AbstractReporter.getStackTrace(AbstractReporter.java:239) > at > org.apache.maven.surefire.report.XMLReporter.writeTestProblems(XMLReporter.java:208) > at > org.apache.maven.surefire.report.XMLReporter.testFailed(XMLReporter.java:191) > at > org.apache.maven.surefire.report.ReporterManager.testFailed(ReporterManager.java:335) > at > org.apache.maven.surefire.report.ReporterManager.testFailed(ReporterManager.java:317) > at > org.apache.maven.surefire.testng.TestNGReporter.onTestFailure(TestNGReporter.java:103) > at org.testng.internal.Invoker.runTestListeners(Invoker.java:1164) > at org.testng.internal.Invoker.runTestListeners(Invoker.java:1149) > at > org.testng.internal.Invoker.handleConfigurationFailure(Invoker.java:191) > at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:179) > at org.testng.internal.Invoker.invokeMethod(Invoker.java:365) > at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785) > at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114) > at org.testng.TestRunner.privateRun(TestRunner.java:693) > at org.testng.TestRunner.run(TestRunner.java:574) > at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241) > at org.testng.SuiteRunner.run(SuiteRunner.java:145) > at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901) > at org.testng.TestNG.runSuitesLocally(TestNG.java:863) > at org.testng.TestNG.run(TestNG.java:613) > at > org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62) > at > org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:136) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira