Module 31: Maven : Process fork failed. | Selenium Forum
M
Posted on 12/03/2016
Hi Ashish,

PLease help me to resolve the below issue:

Also i have attached project folder


I am getting the error C:\maven2016\MyMavenProject\build.xml:107: Process fork failed.
when i run project from cmd prompt

xml-apis\1.4.01\xml-apis-1.4.01.jar:C:\Users\shettarp\.m2\repository\xmlunit\xmlunit\1.5\xmlunit-1.5.jar
[echo] compiling...
[javac] C:\maven2016\MyMavenProject\build.xml:79: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 3 source files to C:\maven2016\MyMavenProject\build
[javac]
[javac] WARNING
[javac]
[javac] The -source switch defaults to 1.8 in JDK 1.8.
[javac] If you specify -target 1.5 you now must also specify -source 1.5.
[javac] Ant will implicitly add -source 1.5 for you. Please change your build file.
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 4 warnings

run:
[junit] WARNING: multiple versions of ant detected in path for junit
[junit] jar:file:/C:/Users/shettarp/Music/apache-ant-1.9.6/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit] and jar:file:/C:/Users/shettarp/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/org/apache/tools/ant/Project.class
[junit] Running com.testing.GoogleTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec

BUILD FAILED
C:\maven2016\MyMavenProject\build.xml:107: Process fork failed.

Total time: 14 seconds

C:\maven2016\MyMavenProject>

M
Replied on 13/03/2016

Hi Ashisih,

i deleted the .m2/repository & ran the command, mvn package & then testrunner from cmd prompt, now i am getting below error, the build successful message is displayed & browser also launches but it doesn't redirect to specified URL.

Also plz look into the below text displayed on cmd prompt

[echo] compiling...
[javac] C:\maven2016\MyMavenProject\build.xml:79: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 3 source files to C:\maven2016\MyMavenProject\build
[javac]
[javac] WARNING
[javac]
[javac] The -source switch defaults to 1.8 in JDK 1.8.
[javac] If you specify -target 1.5 you now must also specify -source 1.5.
[javac] Ant will implicitly add -source 1.5 for you. Please change your build file.
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 4 warnings

run:
[junit] WARNING: multiple versions of ant detected in path for junit
[junit] jar:file:/C:/Users/shettarp/Music/apache-ant-1.9.6/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit] and jar:file:/C:/Users/shettarp/.m2/repository/org/apache/ant/ant/1.9.4/ant-1.9.4.jar!/org/apache/tools/ant/Project.class
[junit] Running com.testing.GoogleTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.716 sec
[junit] Test com.testing.GoogleTest FAILED
[junit] Running com.testing.YahooTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.871 sec
[junit] Test com.testing.YahooTest FAILED
[junitreport] Processing C:\Temp\TESTS-TestSuites.xml to C:\Users\shettarp\AppData\Local\Temp\null818190609
[junitreport] Loading stylesheet jar:file:/C:/Users/shettarp/Music/apache-ant-1.9.6/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 892ms
[junitreport] Deleting: C:\Users\shettarp\AppData\Local\Temp\null818190609

BUILD SUCCESSFUL
Total time: 28 seconds


Thanks,
Pavan


M
Replied on 13/03/2016

[quote:lomc876n]multiple versions of ant detected in path for junit[/quote:lomc876n]

it is still showing multiple version of jar files delete one version and try again.