There was an error in the forked process
See original GitHub issueHello, I’ve tried to migrate my project from jdk 1.6 to jdk 1.7, but faced with following issue:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project test: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test failed: There was an error in the forked process
[ERROR] java.lang.NullPointerException
[ERROR] at java.lang.String.length(String.java:623)
[ERROR] at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:414)
[ERROR] at java.lang.StringBuffer.append(StringBuffer.java:237)
[ERROR] at org.testng.reporters.TestHTMLReporter.generateTable(TestHTMLReporter.java:114)
[ERROR] at org.testng.reporters.TestHTMLReporter.generateLog(TestHTMLReporter.java:305)
[ERROR] at org.testng.reporters.TestHTMLReporter.onFinish(TestHTMLReporter.java:40)
[ERROR] at org.testng.TestRunner.fireEvent(TestRunner.java:1241)
[ERROR] at org.testng.TestRunner.afterRun(TestRunner.java:1032)
[ERROR] at org.testng.TestRunner.run(TestRunner.java:621)
[ERROR] at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
[ERROR] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
[ERROR] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
[ERROR] at org.testng.SuiteRunner.run(SuiteRunner.java:240)
[ERROR] at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
[ERROR] at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
[ERROR] at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
[ERROR] at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
[ERROR] at org.testng.TestNG.run(TestNG.java:1057)
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:91)
[ERROR] at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:204)
[ERROR] at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:107)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:113)
[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] -> [Help 1]
I’m not sure is this a testng problem. Please close issue, if not. P.S. jdk: 1.7.0_25 maven: 3.0.5 maven-surfire-plugin: 2.16
Issue Analytics
- State:
- Created 10 years ago
- Comments:60 (3 by maintainers)
Top Results From Across the Web
how to fix the maven surefire plugin error [there was error in ...
Actually i have given the wrong testNG.xml path in POM.XML that's why it was throwing me that error. Please cross verify your testNG.xml...
Read more >Getting There was an error in the forked process error while ...
Surefire is basically saying that the class instantiation itself failed. Usually happens when you have a constructor that threw an exception or when...
Read more >[#SUREFIRE-1426] Fork crash doesn't fail build with - Apache
SurefireBooterForkException: There was an error in the forked process Unable to load category: stress at org.apache.maven.plugin.surefire.booterclient.
Read more >There was an error in the forked process, upon build project
I have created the POM with Page factory set up and tried to build that project and getting the below error. please help...
Read more >[testng-users] TestNGException while executing mavenized ...
goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process [ERROR] org.testng.TestNGException:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I am updating my JDK from 1.7 to 1.8. There are no compilation errors. -
mvn clean compile test-compile
works fine. Below are the versions of dependencies which I am using: TestNG - 6.14.3 (We were on 6.9.10) Maven Surefire Plugin - 2.21.0 Maven Compiler Plugin - 3.0We have a QA framework which is introduced as dependency in pom.xml in all our projects. We have testng depdendency in QA framework pom.xml as well :
When I do mvn install, I get the following error:
When I try to run my test project via testng.xml or just a single test class, I get the following error:
Can someone tell me what am I doing wrong?
Thanks in advance.
Thank you, Sir, the error is solved…