Discussion:
[GitHub] maven-surefire pull request: Fixed NullPointerException on SmartSt...
Jacobus2k
2014-08-18 10:36:27 UTC
Permalink
GitHub user Jacobus2k opened a pull request:

https://github.com/apache/maven-surefire/pull/44

Fixed NullPointerException on SmartStackTraceParser init occurring when ...

Failsafe report crushes when Thread.contextCassLoader is null:

ERROR] org.apache.maven.surefire.testset.TestSetFailedException: java.lang.NullPointerException
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:206)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:129)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.NullPointerException
[ERROR] at org.apache.maven.surefire.report.SmartStackTraceParser.getClass(SmartStackTraceParser.java:67)
[ERROR] at org.apache.maven.surefire.report.SmartStackTraceParser.<init>(SmartStackTraceParser.java:57)
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4StackTraceWriter.smartTrimmedStackTrace(JUnit4StackTraceWriter.java:77)

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Jacobus2k/maven-surefire master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/maven-surefire/pull/44.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #44

----
commit 409ab7a525fa328378ca195c30e32dedccb145e4
Author: Jacobus2k <***@gmail.com>
Date: 2014-08-18T10:30:26Z

Fixed NullPointerException on SmartStackTraceParser init occurring when Thread.contextClassLoader is null

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at ***@apache.org or file a JIRA ticket
with INFRA.
---
Jacobus2k
2014-10-27 06:16:06 UTC
Permalink
Github user Jacobus2k closed the pull request at:

https://github.com/apache/maven-surefire/pull/44


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at ***@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@maven.apache.org
For additional commands, e-mail: dev-***@maven.apache.org
digantchauhan
2016-07-08 21:39:55 UTC
Permalink
Github user digantchauhan commented on the issue:

https://github.com/apache/maven-surefire/pull/44

Hi, I am seeing the similar issue in latest surefire:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project accounts-webservice: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
[ERROR] org.apache.maven.surefire.testset.TestSetFailedException: java.lang.NullPointerException
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:209)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:138)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:161)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
[ERROR] Caused by: java.lang.NullPointerException
[ERROR] at org.apache.maven.surefire.junitcore.ConcurrentRunListener.testStarting(ConcurrentRunListener.java:135)
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4RunListener.testStarted(JUnit4RunListener.java:91)
[ERROR] at org.junit.runner.notification.RunNotifier$3.notifyListener(RunNotifier.java:115)
[ERROR] at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:61)
[ERROR] at org.junit.runner.notification.RunNotifier.fireTestStarted(RunNotifier.java:112)
[ERROR] at org.apache.maven.surefire.common.junit4.Notifier.fireTestStarted(Notifier.java:100)
[ERROR] at org.junit.internal.runners.model.EachTestNotifier.fireTestStarted(EachTestNotifier.java:43)
[ERROR] at cucumber.runtime.junit.JUnitReporter.startExecutionUnit(JUnitReporter.java:50)
[ERROR] at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:89)
[ERROR] at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
[ERROR] at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
[ERROR] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
[ERROR] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
[ERROR] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
[ERROR] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
[ERROR] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
[ERROR] at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
[ERROR] at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
[ERROR] at cucumber.api.junit.Cucumber.runChild(Cucumber.java:93)
[ERROR] at cucumber.api.junit.Cucumber.runChild(Cucumber.java:37)
[ERROR] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
[ERROR] at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:393)
[ERROR] at org.apache.maven.surefire.junitcore.pc.InvokerStrategy.schedule(InvokerStrategy.java:54)
[ERROR] at org.apache.maven.surefire.junitcore.pc.Scheduler.schedule(Scheduler.java:352)
[ERROR] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
[ERROR] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
[ERROR] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
[ERROR] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
[ERROR] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
[ERROR] at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
[ERROR] at cucumber.api.junit.Cucumber.run(Cucumber.java:98)
[ERROR] at org.junit.runners.Suite.runChild(Suite.java:127)
[ERROR] at org.junit.runners.Suite.runChild(Suite.java:26)
[ERROR] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
[ERROR] at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:393)
[ERROR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[ERROR] at java.lang.Thread.run(Thread.java:745)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at ***@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@maven.apache.org
For additional commands, e-mail: dev-***@maven.apache.org
digantchauhan
2016-07-08 21:51:36 UTC
Permalink
Github user digantchauhan commented on the issue:

https://github.com/apache/maven-surefire/pull/44

We have found out that scenario name was having parentheses in scenario name, so surefire was failing in parsing the scenario name. So no action is required.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at ***@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@maven.apache.org
For additional commands, e-mail: dev-***@maven.apache.org

Loading...