'mvn clean test' crashes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

'mvn clean test' crashes

Mukul Gandhi
Hi all,
    I've been facing some problem during last few weeks, when using the
'mvn clean test' command to run unit tests within my Maven project. At some
point before when this issue is creating problem for me, the 'mvn clean
test' command was working fine with me and all unit tests within my Maven
project were passing. But I'm yet unable to find the reason, why 'mvn clean
test' command is not working for me now.

When I run the command 'mvn clean test' now, my Maven build fails and
following error trace is emitted,

[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time:  05:51 min
[INFO] Finished at: 2020-07-01T09:44:06+05:30
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test)
on project haldiram-restapis: There are test failures.
[ERROR]
[ERROR] Please refer to
F:\eclipseWorkspaces\haldiram_backend_sprint-19_sts\haldiram-backend\haldiram-restapis\target\surefire-reports
for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump,
[date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash
or System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
surefire_07470042422408053869tmp"
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] com.haldiram.business.helper.test.ApplnHelperTest
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The
forked VM terminated without properly saying goodbye. VM crash or
System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
surefire_07470042422408053869tmp"
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] com.haldiram.business.helper.test.ApplnHelperTest
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
[ERROR]         at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR]         at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR]         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR]         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR]         at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[ERROR]         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)


I'll be grateful, if anyone may please guide me why 'mvn clean test'
command is failing for me as per error trace mentioned above, and how to
fix it.




--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Enrico Olivelli
Mukul
Are you walking System.exit or System.halt in your tests?


Enrico


Il Mer 1 Lug 2020, 07:09 Mukul Gandhi <[hidden email]> ha scritto:

> Hi all,
>     I've been facing some problem during last few weeks, when using the
> 'mvn clean test' command to run unit tests within my Maven project. At some
> point before when this issue is creating problem for me, the 'mvn clean
> test' command was working fine with me and all unit tests within my Maven
> project were passing. But I'm yet unable to find the reason, why 'mvn clean
> test' command is not working for me now.
>
> When I run the command 'mvn clean test' now, my Maven build fails and
> following error trace is emitted,
>
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time:  05:51 min
> [INFO] Finished at: 2020-07-01T09:44:06+05:30
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test)
> on project haldiram-restapis: There are test failures.
> [ERROR]
> [ERROR] Please refer to
>
> F:\eclipseWorkspaces\haldiram_backend_sprint-19_sts\haldiram-backend\haldiram-restapis\target\surefire-reports
> for the individual test results.
> [ERROR] Please refer to dump files (if any exist) [date].dump,
> [date]-jvmRun[N].dump and [date].dumpstream.
> [ERROR] The forked VM terminated without properly saying goodbye. VM crash
> or System.exit called?
> [ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
>
> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
> 2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
> surefire_07470042422408053869tmp"
> [ERROR] Process Exit Code: 0
> [ERROR] Crashed tests:
> [ERROR] com.haldiram.business.helper.test.ApplnHelperTest
> [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The
> forked VM terminated without properly saying goodbye. VM crash or
> System.exit called?
> [ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
>
> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
> 2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
> surefire_07470042422408053869tmp"
> [ERROR] Process Exit Code: 0
> [ERROR] Crashed tests:
> [ERROR] com.haldiram.business.helper.test.ApplnHelperTest
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
> [ERROR]         at
>
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> [ERROR]         at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
> [ERROR]         at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
> [ERROR]         at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
> [ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
> [ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
> [ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
> [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [ERROR]         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [ERROR]         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
> [ERROR]         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
> [ERROR]         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
> [ERROR]         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
> [ERROR]         at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
>
>
> I'll be grateful, if anyone may please guide me why 'mvn clean test'
> command is failing for me as per error trace mentioned above, and how to
> fix it.
>
>
>
>
> --
> Regards,
> Mukul Gandhi
>
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Bernd Eckenfels
In reply to this post by Mukul Gandhi
Anything in the mentioned dump files? Could be a environment variable problem or corrupted Java Home (less likely a problem in the test code).

You can also try to specify -DskipTests to see if the rest of the Maven build works.

Gruss
Bernd


--
http://bernd.eckenfels.net
________________________________
Von: Mukul Gandhi <[hidden email]>
Gesendet: Wednesday, July 1, 2020 7:08:50 AM
An: [hidden email] <[hidden email]>
Betreff: 'mvn clean test' crashes

Hi all,
    I've been facing some problem during last few weeks, when using the
'mvn clean test' command to run unit tests within my Maven project. At some
point before when this issue is creating problem for me, the 'mvn clean
test' command was working fine with me and all unit tests within my Maven
project were passing. But I'm yet unable to find the reason, why 'mvn clean
test' command is not working for me now.

When I run the command 'mvn clean test' now, my Maven build fails and
following error trace is emitted,

[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time:  05:51 min
[INFO] Finished at: 2020-07-01T09:44:06+05:30
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test)
on project haldiram-restapis: There are test failures.
[ERROR]
[ERROR] Please refer to
F:\eclipseWorkspaces\haldiram_backend_sprint-19_sts\haldiram-backend\haldiram-restapis\target\surefire-reports
for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump,
[date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash
or System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
surefire_07470042422408053869tmp"
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] com.haldiram.business.helper.test.ApplnHelperTest
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The
forked VM terminated without properly saying goodbye. VM crash or
System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
surefire_07470042422408053869tmp"
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] com.haldiram.business.helper.test.ApplnHelperTest
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
[ERROR]         at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR]         at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR]         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR]         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR]         at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[ERROR]         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)


I'll be grateful, if anyone may please guide me why 'mvn clean test'
command is failing for me as per error trace mentioned above, and how to
fix it.




--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Mukul Gandhi
In reply to this post by Enrico Olivelli
Hi Enrico,

On Wed, Jul 1, 2020 at 10:47 AM Enrico Olivelli <[hidden email]> wrote:


> Are you walking System.exit or System.halt in your tests?
>

I'm not using either of System.exit or System.halt within my tests code.
I'm also neither, using these two statements within my business logic code.



--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Mukul Gandhi
In reply to this post by Bernd Eckenfels
Hi Bernd,

On Wed, Jul 1, 2020 at 10:50 AM Bernd Eckenfels <[hidden email]>
wrote:

> Anything in the mentioned dump files?


When my command, 'mvn clean test' finishes (with an error that I mentioned
earlier), there are no file(s) with name *.dump* created on my workstation
(I'm looking, within my Maven project folder tree).


> Could be a environment variable problem or corrupted Java Home (less
> likely a problem in the test code).
>

I'm not sure, how to debug as per these aspects.

You can also try to specify -DskipTests to see if the rest of the Maven
> build works.
>

The command 'mvn clean package -DskipTests' results in successful build for
me.




--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Enrico Olivelli
In reply to this post by Mukul Gandhi
Can you try to run one test at a time and see which test is crashing your
build?

Use
mvn test -Dtest=NameOfTheTestClass


Enrico

Il Mer 1 Lug 2020, 07:37 Mukul Gandhi <[hidden email]> ha scritto:

> Hi Enrico,
>
> On Wed, Jul 1, 2020 at 10:47 AM Enrico Olivelli <[hidden email]>
> wrote:
>
>
> > Are you walking System.exit or System.halt in your tests?
> >
>
> I'm not using either of System.exit or System.halt within my tests code.
> I'm also neither, using these two statements within my business logic code.
>
>
>
> --
> Regards,
> Mukul Gandhi
>
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Mukul Gandhi
Hi Enrico,

On Wed, Jul 1, 2020 at 11:34 AM Enrico Olivelli <[hidden email]> wrote:

> Can you try to run one test at a time and see which test is crashing your
> build?
>
> Use
> mvn test -Dtest=NameOfTheTestClass
>

When I run all my tests, with command 'mvn clean test', my build failed
with following message,

[ERROR] Crashed tests:
[ERROR] com.haldiram.business.helper.test.ApplnHelperTest
...

When I run only the tests present in class
com.haldiram.business.helper.test.ApplnHelperTest, with following command,

mvn clean test -Dtest=com.haldiram.business.helper.test.ApplnHelperTest

The Maven build emits following error,

[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time:  24.624 s
[INFO] Finished at: 2020-07-01T12:56:40+05:30
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test)
on project Verimployee-core: No tests were executed!  (Set
-DfailIfNoTests=false to ignore this error.)

Therefore, I run the above command as follows,

mvn clean test
-Dtest=com.haldiram.business.helper.test.ApplnHelperTest -DfailIfNoTests=false

And all the tests present in class
com.haldiram.business.helper.test.ApplnHelperTest pass, and the Maven build
succeeds.

My problem, that I described originally in this thread, still remains. I
hope, someone may help me further on this issue.




--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Enrico Olivelli
I suggest you to debug that test, with an IDE or just by adding some
System.out.println

Enrico

Il Mer 1 Lug 2020, 09:41 Mukul Gandhi <[hidden email]> ha scritto:

> Hi Enrico,
>
> On Wed, Jul 1, 2020 at 11:34 AM Enrico Olivelli <[hidden email]>
> wrote:
>
> > Can you try to run one test at a time and see which test is crashing your
> > build?
> >
> > Use
> > mvn test -Dtest=NameOfTheTestClass
> >
>
> When I run all my tests, with command 'mvn clean test', my build failed
> with following message,
>
> [ERROR] Crashed tests:
> [ERROR] com.haldiram.business.helper.test.ApplnHelperTest
> ...
>
> When I run only the tests present in class
> com.haldiram.business.helper.test.ApplnHelperTest, with following command,
>
> mvn clean test -Dtest=com.haldiram.business.helper.test.ApplnHelperTest
>
> The Maven build emits following error,
>
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time:  24.624 s
> [INFO] Finished at: 2020-07-01T12:56:40+05:30
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test)
> on project Verimployee-core: No tests were executed!  (Set
> -DfailIfNoTests=false to ignore this error.)
>
> Therefore, I run the above command as follows,
>
> mvn clean test
> -Dtest=com.haldiram.business.helper.test.ApplnHelperTest
> -DfailIfNoTests=false
>
> And all the tests present in class
> com.haldiram.business.helper.test.ApplnHelperTest pass, and the Maven build
> succeeds.
>
> My problem, that I described originally in this thread, still remains. I
> hope, someone may help me further on this issue.
>
>
>
>
> --
> Regards,
> Mukul Gandhi
>
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Mukul Gandhi
Hi Enrico,

On Wed, Jul 1, 2020 at 1:13 PM Enrico Olivelli <[hidden email]> wrote:

> I suggest you to debug that test, with an IDE or just by adding some
> System.out.println
>

When I run only the tests present in offending java class
(com.haldiram.business.helper.test.ApplnHelperTest), from within the IDE,
all the tests in the class pass.

But, when I run all the tests present within my aggregated Maven project
(multi module Maven project), using the command 'mvn clean test', the Maven
build failure says following,

[ERROR] Crashed tests:
[ERROR] com.haldiram.business.helper.test.ApplnHelperTest
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
...

All of the above, were done on a Windows workstation.

Also, when a Jenkins build pipeline invokes the command 'mvn clean test' on
a Linux system for all of my same codebase, all the tests pass and Maven
build succeeds there.

I've a strong feeling that, all my unit tests have no issues from the tests
code perspective. I feel, there could be some other issue, that I'm unable
to solve at this moment. Any further pointers to solve the issues I've
mentioned in this thread would be welcome.




--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Bernd Eckenfels
Has the machine enough ram free? Did you try a reboot (sometimes windows memory map seems to be fragmented in a way that java can't start). Does your Pom overwrite command line and/or specify a very big or very small heap? Any crash dumps or hs_err files?

Gruss
Bernd


--
http://bernd.eckenfels.net
________________________________
Von: Mukul Gandhi <[hidden email]>
Gesendet: Wednesday, July 1, 2020 10:47:45 AM
An: Maven Users List <[hidden email]>
Betreff: Re: 'mvn clean test' crashes

Hi Enrico,

On Wed, Jul 1, 2020 at 1:13 PM Enrico Olivelli <[hidden email]> wrote:

> I suggest you to debug that test, with an IDE or just by adding some
> System.out.println
>

When I run only the tests present in offending java class
(com.haldiram.business.helper.test.ApplnHelperTest), from within the IDE,
all the tests in the class pass.

But, when I run all the tests present within my aggregated Maven project
(multi module Maven project), using the command 'mvn clean test', the Maven
build failure says following,

[ERROR] Crashed tests:
[ERROR] com.haldiram.business.helper.test.ApplnHelperTest
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
...

All of the above, were done on a Windows workstation.

Also, when a Jenkins build pipeline invokes the command 'mvn clean test' on
a Linux system for all of my same codebase, all the tests pass and Maven
build succeeds there.

I've a strong feeling that, all my unit tests have no issues from the tests
code perspective. I feel, there could be some other issue, that I'm unable
to solve at this moment. Any further pointers to solve the issues I've
mentioned in this thread would be welcome.




--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Gary Gregory-2
Have you tried the more recent version of the Maven surefire plugin?

Gary

On Wed, Jul 1, 2020, 05:06 Bernd Eckenfels <[hidden email]> wrote:

> Has the machine enough ram free? Did you try a reboot (sometimes windows
> memory map seems to be fragmented in a way that java can't start). Does
> your Pom overwrite command line and/or specify a very big or very small
> heap? Any crash dumps or hs_err files?
>
> Gruss
> Bernd
>
>
> --
> http://bernd.eckenfels.net
> ________________________________
> Von: Mukul Gandhi <[hidden email]>
> Gesendet: Wednesday, July 1, 2020 10:47:45 AM
> An: Maven Users List <[hidden email]>
> Betreff: Re: 'mvn clean test' crashes
>
> Hi Enrico,
>
> On Wed, Jul 1, 2020 at 1:13 PM Enrico Olivelli <[hidden email]>
> wrote:
>
> > I suggest you to debug that test, with an IDE or just by adding some
> > System.out.println
> >
>
> When I run only the tests present in offending java class
> (com.haldiram.business.helper.test.ApplnHelperTest), from within the IDE,
> all the tests in the class pass.
>
> But, when I run all the tests present within my aggregated Maven project
> (multi module Maven project), using the command 'mvn clean test', the Maven
> build failure says following,
>
> [ERROR] Crashed tests:
> [ERROR] com.haldiram.business.helper.test.ApplnHelperTest
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
> ...
>
> All of the above, were done on a Windows workstation.
>
> Also, when a Jenkins build pipeline invokes the command 'mvn clean test' on
> a Linux system for all of my same codebase, all the tests pass and Maven
> build succeeds there.
>
> I've a strong feeling that, all my unit tests have no issues from the tests
> code perspective. I feel, there could be some other issue, that I'm unable
> to solve at this moment. Any further pointers to solve the issues I've
> mentioned in this thread would be welcome.
>
>
>
>
> --
> Regards,
> Mukul Gandhi
>
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Mukul Gandhi
Hi Gary,

On Wed, Jul 1, 2020 at 4:26 PM Gary Gregory <[hidden email]> wrote:

> Have you tried the more recent version of the Maven surefire plugin?
>

I'm using Maven 3.6.3.

I changed to the latest stable version of Maven surefire plugin (3.0.0-M5),
and its producing the same build error. I was using Maven surefire plugin
version 2.22.2 earlier.

I've also debugged along the lines of latest comment by Bernd, with regards
to available RAM on my Windows dev workstation. I've total RAM of 8 GB.
Originally, I was working with default settings for -Xmx on MAVEN_OPTS
environment variable (which I guess has value 512 MB). I changed that to 3
GB, and my workstation's total RAM usage is well below 100% (it hovers
around 70%) during my entire run of command 'mvn clean test', and I get
same test case crash.

I've also found related information at,
https://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html.
At the bottom of this link, following is mentioned,
<quote>
Crashed forked JVM caused listing the crashed test(s)

After the JVM exited abruptly, the console lists the message Crashed tests:
with a list of crashed tests if the entire test-set has not been yet
completed. This happens if a test exited, killed JVM or a segmentation
fault crashed JVM. In such cases you may be interested in dump files
generated in reports directory, see FAQ.
</quote>

When I read the FAQ (the last word within above 'quote'), and according to
that information, I see following hint in the
file 2020-07-02T11-58-54_573.dumpstream (there are no other dump files
created during my run of 'mvn clean test'),
*Boot Manifest-JAR contains absolute paths in classpath
'F:\eclipseWorkspaces\haldiram_backend_sprint-19_sts\haldiram-backend\haldiram-restapis\target\test-classes'*
*Hint:
<argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>*

According to above referred hint, I then ran the following command,
mvn clean test -Djdk.net.URLClassPath.disableClassPathURLCheck=true

But this produced the same error (although, this time the mvn test process
crashed on a different test file than what I experienced originally).

Any thoughts, what I could do next on my Windows dev workstation to solve
the problem I've mentioned in this thread?



--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Gary Gregory-2
You could try to set the fork count to 1.

Gary

On Thu, Jul 2, 2020, 02:51 Mukul Gandhi <[hidden email]> wrote:

> Hi Gary,
>
> On Wed, Jul 1, 2020 at 4:26 PM Gary Gregory <[hidden email]>
> wrote:
>
> > Have you tried the more recent version of the Maven surefire plugin?
> >
>
> I'm using Maven 3.6.3.
>
> I changed to the latest stable version of Maven surefire plugin (3.0.0-M5),
> and its producing the same build error. I was using Maven surefire plugin
> version 2.22.2 earlier.
>
> I've also debugged along the lines of latest comment by Bernd, with regards
> to available RAM on my Windows dev workstation. I've total RAM of 8 GB.
> Originally, I was working with default settings for -Xmx on MAVEN_OPTS
> environment variable (which I guess has value 512 MB). I changed that to 3
> GB, and my workstation's total RAM usage is well below 100% (it hovers
> around 70%) during my entire run of command 'mvn clean test', and I get
> same test case crash.
>
> I've also found related information at,
>
> https://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html
> .
> At the bottom of this link, following is mentioned,
> <quote>
> Crashed forked JVM caused listing the crashed test(s)
>
> After the JVM exited abruptly, the console lists the message Crashed tests:
> with a list of crashed tests if the entire test-set has not been yet
> completed. This happens if a test exited, killed JVM or a segmentation
> fault crashed JVM. In such cases you may be interested in dump files
> generated in reports directory, see FAQ.
> </quote>
>
> When I read the FAQ (the last word within above 'quote'), and according to
> that information, I see following hint in the
> file 2020-07-02T11-58-54_573.dumpstream (there are no other dump files
> created during my run of 'mvn clean test'),
> *Boot Manifest-JAR contains absolute paths in classpath
>
> 'F:\eclipseWorkspaces\haldiram_backend_sprint-19_sts\haldiram-backend\haldiram-restapis\target\test-classes'*
> *Hint:
> <argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>*
>
> According to above referred hint, I then ran the following command,
> mvn clean test -Djdk.net.URLClassPath.disableClassPathURLCheck=true
>
> But this produced the same error (although, this time the mvn test process
> crashed on a different test file than what I experienced originally).
>
> Any thoughts, what I could do next on my Windows dev workstation to solve
> the problem I've mentioned in this thread?
>
>
>
> --
> Regards,
> Mukul Gandhi
>
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Tibor Digana
In reply to this post by Mukul Gandhi
We do not provide a support. See the message properly. The test reports and
dump files.

Dňa st 1. 7. 2020, 7:09 Mukul Gandhi <[hidden email]> napísal(a):

> Hi all,
>     I've been facing some problem during last few weeks, when using the
> 'mvn clean test' command to run unit tests within my Maven project. At some
> point before when this issue is creating problem for me, the 'mvn clean
> test' command was working fine with me and all unit tests within my Maven
> project were passing. But I'm yet unable to find the reason, why 'mvn clean
> test' command is not working for me now.
>
> When I run the command 'mvn clean test' now, my Maven build fails and
> following error trace is emitted,
>
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time:  05:51 min
> [INFO] Finished at: 2020-07-01T09:44:06+05:30
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test)
> on project haldiram-restapis: There are test failures.
> [ERROR]
> [ERROR] Please refer to
>
> F:\eclipseWorkspaces\haldiram_backend_sprint-19_sts\haldiram-backend\haldiram-restapis\target\surefire-reports
> for the individual test results.
> [ERROR] Please refer to dump files (if any exist) [date].dump,
> [date]-jvmRun[N].dump and [date].dumpstream.
> [ERROR] The forked VM terminated without properly saying goodbye. VM crash
> or System.exit called?
> [ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
>
> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
> 2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
> surefire_07470042422408053869tmp"
> [ERROR] Process Exit Code: 0
> [ERROR] Crashed tests:
> [ERROR] com.haldiram.business.helper.test.ApplnHelperTest
> [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The
> forked VM terminated without properly saying goodbye. VM crash or
> System.exit called?
> [ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
>
> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
> 2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
> surefire_07470042422408053869tmp"
> [ERROR] Process Exit Code: 0
> [ERROR] Crashed tests:
> [ERROR] com.haldiram.business.helper.test.ApplnHelperTest
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
> [ERROR]         at
>
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> [ERROR]         at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
> [ERROR]         at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
> [ERROR]         at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
> [ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
> [ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
> [ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
> [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [ERROR]         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [ERROR]         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
> [ERROR]         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
> [ERROR]         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
> [ERROR]         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
> [ERROR]         at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
>
>
> I'll be grateful, if anyone may please guide me why 'mvn clean test'
> command is failing for me as per error trace mentioned above, and how to
> fix it.
>
>
>
>
> --
> Regards,
> Mukul Gandhi
>
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Tibor Digana
You use jdk11. The jpms was activated. Deactivate it with the workaround,
config param "useModulePath" set to "false".

Dňa ne 5. 7. 2020, 15:27 Tibor Digana <[hidden email]> napísal(a):

> We do not provide a support. See the message properly. The test reports
> and dump files.
>
> Dňa st 1. 7. 2020, 7:09 Mukul Gandhi <[hidden email]> napísal(a):
>
>> Hi all,
>>     I've been facing some problem during last few weeks, when using the
>> 'mvn clean test' command to run unit tests within my Maven project. At
>> some
>> point before when this issue is creating problem for me, the 'mvn clean
>> test' command was working fine with me and all unit tests within my Maven
>> project were passing. But I'm yet unable to find the reason, why 'mvn
>> clean
>> test' command is not working for me now.
>>
>> When I run the command 'mvn clean test' now, my Maven build fails and
>> following error trace is emitted,
>>
>> [INFO] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time:  05:51 min
>> [INFO] Finished at: 2020-07-01T09:44:06+05:30
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test)
>> on project haldiram-restapis: There are test failures.
>> [ERROR]
>> [ERROR] Please refer to
>>
>> F:\eclipseWorkspaces\haldiram_backend_sprint-19_sts\haldiram-backend\haldiram-restapis\target\surefire-reports
>> for the individual test results.
>> [ERROR] Please refer to dump files (if any exist) [date].dump,
>> [date]-jvmRun[N].dump and [date].dumpstream.
>> [ERROR] The forked VM terminated without properly saying goodbye. VM crash
>> or System.exit called?
>> [ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
>>
>> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
>> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
>> 2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
>> surefire_07470042422408053869tmp"
>> [ERROR] Process Exit Code: 0
>> [ERROR] Crashed tests:
>> [ERROR] com.haldiram.business.helper.test.ApplnHelperTest
>> [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The
>> forked VM terminated without properly saying goodbye. VM crash or
>> System.exit called?
>> [ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
>>
>> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817\surefirebooter5568422068326404815.jar
>> C:\Users\mukul\AppData\Local\Temp\surefire7064994840408638817
>> 2020-07-01T09-38-42_797-jvmRun1 surefire5010876784124620015tmp
>> surefire_07470042422408053869tmp"
>> [ERROR] Process Exit Code: 0
>> [ERROR] Crashed tests:
>> [ERROR] com.haldiram.business.helper.test.ApplnHelperTest
>> [ERROR]         at
>>
>> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
>> [ERROR]         at
>>
>> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
>> [ERROR]         at
>>
>> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
>> [ERROR]         at
>>
>> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
>> [ERROR]         at
>>
>> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
>> [ERROR]         at
>>
>> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
>> [ERROR]         at
>>
>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
>> [ERROR]         at
>>
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
>> [ERROR]         at
>>
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
>> [ERROR]         at
>>
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
>> [ERROR]         at
>>
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
>> [ERROR]         at
>>
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
>> [ERROR]         at
>>
>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
>> [ERROR]         at
>>
>> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>> [ERROR]         at
>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
>> [ERROR]         at
>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
>> [ERROR]         at
>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
>> [ERROR]         at
>> org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
>> [ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
>> [ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
>> [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> Method)
>> [ERROR]         at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> [ERROR]         at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> [ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
>> [ERROR]         at
>>
>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
>> [ERROR]         at
>>
>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
>> [ERROR]         at
>>
>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
>> [ERROR]         at
>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
>>
>>
>> I'll be grateful, if anyone may please guide me why 'mvn clean test'
>> command is failing for me as per error trace mentioned above, and how to
>> fix it.
>>
>>
>>
>>
>> --
>> Regards,
>> Mukul Gandhi
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Mukul Gandhi
In reply to this post by Tibor Digana
Hi Tibor,

On Sun, Jul 5, 2020 at 6:57 PM Tibor Digana <[hidden email]> wrote:

> We do not provide a support.


I understand that, and I don't assume assured support.

Refering to the page, https://maven.apache.org/users/getting-help.html which
says following,
<quote>
   Ask on the user list
   Our community is very helpful, just ask it the right way. See the
references section, at the end of this page, for info on how to do that.
Subscribe to the users-list and describe your problem       there. Don't
expect to get an answer right away. Sometimes it takes a couple of days.
</quote>

In spirit of the above referred quote, I'm seeking help on this list.


> See the message properly. The test reports and dump files.
>

Definetely, I'll do that to try figuring the reason of the issues I'm
facing.



--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Mukul Gandhi
In reply to this post by Gary Gregory-2
Hi Gary,

On Sun, Jul 5, 2020 at 6:52 PM Gary Gregory <[hidden email]> wrote:

You could try to set the fork count to 1.
>

As per Maven documentation, 'The default setting is
forkCount=1/reuseForks=true'. Even when I explicitly specify these values
within my Maven project's pom, I get the same build error that I mentioned
originally within this thread. forkCount=1/reuseForks=false also doesn't
work for me and fails my build with same sorts of error.

I also don't wish to specify value of forkCount greater than 1, since I
don't want my Maven project tests to run parallely. Because, most of my
tests interact transactionally with a DB, and I believe parallel test
execution would be problematic for my case.

Any further thoughts would be useful to me.




--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Gary Gregory-2
I've tried to deal with JVM crashes in the FailSafe (I was not having the
problem in SureFire) plugin by using:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${hmp.failsafe.version}</version>
        <configuration>
          <forkCount>1</forkCount>
          <reuseForks>false</reuseForks>
        </configuration>
      </plugin>

and then defining the plugin version in a property "hmp.failsafe.version"
which I can vary on the command line until I find one that works.

Gary

On Tue, Jul 7, 2020 at 6:38 AM Mukul Gandhi <[hidden email]> wrote:

> Hi Gary,
>
> On Sun, Jul 5, 2020 at 6:52 PM Gary Gregory <[hidden email]>
> wrote:
>
> You could try to set the fork count to 1.
> >
>
> As per Maven documentation, 'The default setting is
> forkCount=1/reuseForks=true'. Even when I explicitly specify these values
> within my Maven project's pom, I get the same build error that I mentioned
> originally within this thread. forkCount=1/reuseForks=false also doesn't
> work for me and fails my build with same sorts of error.
>
> I also don't wish to specify value of forkCount greater than 1, since I
> don't want my Maven project tests to run parallely. Because, most of my
> tests interact transactionally with a DB, and I believe parallel test
> execution would be problematic for my case.
>
> Any further thoughts would be useful to me.
>
>
>
>
> --
> Regards,
> Mukul Gandhi
>
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Mukul Gandhi
On Tue, Jul 7, 2020 at 5:49 PM Gary Gregory <[hidden email]> wrote:

> I've tried to deal with JVM crashes in the FailSafe (I was not having the
> problem in SureFire) plugin by using:
>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-failsafe-plugin</artifactId>
>         <version>${hmp.failsafe.version}</version>
>         <configuration>
>           <forkCount>1</forkCount>
>           <reuseForks>false</reuseForks>
>         </configuration>
>       </plugin>
>
> and then defining the plugin version in a property "hmp.failsafe.version"
> which I can vary on the command line until I find one that works.
>

Apologies for a delayed response.

I ran the Maven failsafe plugin as follows, on my Maven project,

1) Writing following on my project's pom.xml file,

<plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-failsafe-plugin</artifactId>
     <version>3.0.0-M5</version>
     <executions>
          <execution>
              <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
              </goals>
          </execution>
      </executions>
</plugin>

2) Then ran the command, mvn verify, and ended up with following build
failure later on,

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test)
on project haldiram-restapis: There are test failures.
[ERROR]
[ERROR] Please refer to
F:\eclipseWorkspaces\haldiram_backend_sprint-19_sts\haldiram-backend\haldiram-restapis\target\surefire-reports
for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump,
[date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash
or System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
C:\Users\mukul\AppData\Local\Temp\surefire3134098195507014049\surefirebooter1502262479067394524.jar
C:\Users\mukul\AppData\Local\Temp\surefire3134098195507014049
2020-07-28T10-29-13_841-jvmRun1 surefire1223251262479907793tmp
surefire_0418826577673802994tmp"
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] com.haldiram.business.helper.test.SuspiciousActivityHelperTest
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The
forked VM terminated without properly saying goodbye. VM crash or
System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\jdk1.8.0_241\jre\bin\java -jar
C:\Users\mukul\AppData\Local\Temp\surefire3134098195507014049\surefirebooter1502262479067394524.jar
C:\Users\mukul\AppData\Local\Temp\surefire3134098195507014049
2020-07-28T10-29-13_841-jvmRun1 surefire1223251262479907793tmp
surefire_0418826577673802994tmp"
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] com.haldiram.business.helper.test.SuspiciousActivityHelperTest
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
[ERROR]         at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR]         at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR]         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR]         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR]         at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[ERROR]         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

Before I faced above failure, lot may tests within my Maven project passed.
I would expect, build success instead.

For above mentioned work, I've been following the instructions here,
https://maven.apache.org/surefire/maven-failsafe-plugin/usage.html.

Any thoughts, what I could do next, to continue with this work successfully?



--
Regards,
Mukul Gandhi
Reply | Threaded
Open this post in threaded view
|

Re: 'mvn clean test' crashes

Mukul Gandhi
In reply to this post by Gary Gregory-2
On Tue, Jul 7, 2020 at 5:49 PM Gary Gregory <[hidden email]> wrote:

> I've tried to deal with JVM crashes in the FailSafe (I was not having the
> problem in SureFire) plugin by using:
>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-failsafe-plugin</artifactId>
>         <version>${hmp.failsafe.version}</version>
>         <configuration>
>           <forkCount>1</forkCount>
>           <reuseForks>false</reuseForks>
>         </configuration>
>       </plugin>
>

I also ran the command 'mvn verify', by exactly specifying above within my
Maven project's pom.xml file (and specifying the version
as <version>3.0.0-M5</version>), and got the same kind of build failure
errors, as I've mentioned in my previous post on this list.

Any further thoughts, about how to solve the problems I'm facing as
specified within this thread, would be appreciated.



--
Regards,
Mukul Gandhi