Re: 'mvn clean test' crashes

2020-10-09 Thread Tibor Digaňa
Hi Mukul, the problem with System.exit() can be in a library - dependency,
not only in your code and therefore the system manager has to be configured
in system property in order to find and confirm the hypothesis. T

Dňa pi 9. 10. 2020, 18:01 Enrico Olivelli  napísal(a):

> Something like this:
>
> public class NoExitSecurityManager extends SecurityManager {
>
> private final SecurityManager wrapped;
>
> public static void setup() {
> Policy.setPolicy(new Policy() {
>
> final Permissions pc = new Permissions();
>
> {
> pc.add(new AllPermission());
> }
>
> @Override
> public boolean implies(ProtectionDomain domain, Permission
> permission) {
> return true;
> }
>
> @Override
> public PermissionCollection getPermissions(ProtectionDomain
> domain) {
> return pc;
> }
>
> @Override
> public PermissionCollection getPermissions(CodeSource
> codesource) {
> return pc;
> }
>
> });
> System.setSecurityManager(new NoExitSecurityManager());
> }
>
> public NoExitSecurityManager() {
> wrapped = new SecurityManager();
> }
>
> public NoExitSecurityManager(SecurityManager wrapped) {
> this.wrapped = wrapped;
> }
>
> @Override
> public void checkExit(int status) {
> StackTraceElement[] stackTrace =
> Thread.currentThread().getStackTrace();
> if (stackTrace != null) {
> for (StackTraceElement el : stackTrace) {
> String className = el.getClassName();
> if (className != null
> &&
> className.startsWith("org.apache.maven.surefire.booter.ForkedBooter")
> && ("acknowledgedExit".equals(el.getMethodName())
> || "exit".equals(el.getMethodName( {
> return;
> }
> }
> }
> throw new SecurityException("System.exit is disabled on unit
> tests");
>
> }
>
> @Override
> public void checkPermission(Permission perm) {
> if (wrapped == null) {
> return;
> }
> if (perm instanceof FilePermission) {
> // preveniamo errori su Jenkins
> return;
> }
> if (perm instanceof ReflectPermission) {
> return;
> }
> wrapped.checkPermission(perm);
> }
>
> }
>
> Il giorno ven 9 ott 2020 alle ore 09:19 Mukul Gandhi <
> gandhi.mu...@gmail.com>
> ha scritto:
>
> > On Wed, Oct 7, 2020 at 9:09 PM Enrico Olivelli 
> > wrote:
> >
> > > A good approach to workaround the presence of third party libraries
> that
> > > call System.exit is to set a SecurityManager that prevents calls to
> > > System.exit.
> >
> >
> > I'll find it helpful, if you may share any code sample how to do this?
> >
> >
> >
> > --
> > Regards,
> > Mukul Gandhi
> >
>


Re: 'mvn clean test' crashes

2020-10-09 Thread Enrico Olivelli
Something like this:

public class NoExitSecurityManager extends SecurityManager {

private final SecurityManager wrapped;

public static void setup() {
Policy.setPolicy(new Policy() {

final Permissions pc = new Permissions();

{
pc.add(new AllPermission());
}

@Override
public boolean implies(ProtectionDomain domain, Permission
permission) {
return true;
}

@Override
public PermissionCollection getPermissions(ProtectionDomain
domain) {
return pc;
}

@Override
public PermissionCollection getPermissions(CodeSource
codesource) {
return pc;
}

});
System.setSecurityManager(new NoExitSecurityManager());
}

public NoExitSecurityManager() {
wrapped = new SecurityManager();
}

public NoExitSecurityManager(SecurityManager wrapped) {
this.wrapped = wrapped;
}

@Override
public void checkExit(int status) {
StackTraceElement[] stackTrace =
Thread.currentThread().getStackTrace();
if (stackTrace != null) {
for (StackTraceElement el : stackTrace) {
String className = el.getClassName();
if (className != null
&&
className.startsWith("org.apache.maven.surefire.booter.ForkedBooter")
&& ("acknowledgedExit".equals(el.getMethodName())
|| "exit".equals(el.getMethodName( {
return;
}
}
}
throw new SecurityException("System.exit is disabled on unit
tests");

}

@Override
public void checkPermission(Permission perm) {
if (wrapped == null) {
return;
}
if (perm instanceof FilePermission) {
// preveniamo errori su Jenkins
return;
}
if (perm instanceof ReflectPermission) {
return;
}
wrapped.checkPermission(perm);
}

}

Il giorno ven 9 ott 2020 alle ore 09:19 Mukul Gandhi 
ha scritto:

> On Wed, Oct 7, 2020 at 9:09 PM Enrico Olivelli 
> wrote:
>
> > A good approach to workaround the presence of third party libraries that
> > call System.exit is to set a SecurityManager that prevents calls to
> > System.exit.
>
>
> I'll find it helpful, if you may share any code sample how to do this?
>
>
>
> --
> Regards,
> Mukul Gandhi
>


Re: 'mvn clean test' crashes

2020-10-09 Thread Mukul Gandhi
On Wed, Oct 7, 2020 at 9:09 PM Enrico Olivelli  wrote:

> A good approach to workaround the presence of third party libraries that
> call System.exit is to set a SecurityManager that prevents calls to
> System.exit.


I'll find it helpful, if you may share any code sample how to do this?



-- 
Regards,
Mukul Gandhi


Re: 'mvn clean test' crashes

2020-10-07 Thread Enrico Olivelli
A good approach to workaround the presence of third party libraries that
call System.exit is to set a SecurityManager that prevents calls to
System.exit. I did it a few times with good results.
You will have to allow well known libraries like Eclipse test runner or
Surefire itself

Just my 2 cents

Enrico

Il giorno mer 7 ott 2020 alle ore 09:50 Mukul Gandhi 
ha scritto:

> Hi Tibor,
>
> On Wed, Sep 30, 2020 at 5:03 PM Tibor Digana 
> wrote:
>
> > Usually these errors appear in the test itself or the *libraries*.
> > As for instance, we found out that a Spring's library is implementing
> Kafka
> > stuff calling the "Runtime.getRuntime().halt(  )".
> > The same bad thing is to call the "System.exit()".
> > I have recognized this situation after I saw a crashed test in your logs.
> > The test is supposed to be crashed if the execution breaks abruptly
> without
> > receiving a JUnit/TestNG event about finishing the test, see this log:
> >
> > *[ERROR] Crashed tests: [ERROR] com.haldiram.business.helper.t*
> > *est.SuspiciousActivityHelperTe**st*
> >
>
> Nowhere within my code (that's been tested by junit) and within my unit
> tests, I've used things like 'Runtime.getRuntime().halt' or 'System.exit'.
>
> The following within the logs that I've shared,
>
> (i.e *[ERROR] Crashed tests: [ERROR] com.haldiram.business.helper.t*
> *est.SuspiciousActivityHelperTe**st*)
>
> that you've cited, doesn't indicate any of the things like use
> of 'Runtime.getRuntime().halt' or 'System.exit'. For the information, the
> name 'SuspiciousActivityHelper' is a business name within my application,
> and is not anything related to technical suspicious aspects within my
> application or test codebases.
>
> The issues that I've discussed within this thread, still causes the same
> problems to me.
>
>
>
>
> --
> Regards,
> Mukul Gandhi
>


Re: 'mvn clean test' crashes

2020-10-07 Thread Mukul Gandhi
Hi Tibor,

On Wed, Sep 30, 2020 at 5:03 PM Tibor Digana  wrote:

> Usually these errors appear in the test itself or the *libraries*.
> As for instance, we found out that a Spring's library is implementing Kafka
> stuff calling the "Runtime.getRuntime().halt(  )".
> The same bad thing is to call the "System.exit()".
> I have recognized this situation after I saw a crashed test in your logs.
> The test is supposed to be crashed if the execution breaks abruptly without
> receiving a JUnit/TestNG event about finishing the test, see this log:
>
> *[ERROR] Crashed tests: [ERROR] com.haldiram.business.helper.t*
> *est.SuspiciousActivityHelperTe**st*
>

Nowhere within my code (that's been tested by junit) and within my unit
tests, I've used things like 'Runtime.getRuntime().halt' or 'System.exit'.

The following within the logs that I've shared,

(i.e *[ERROR] Crashed tests: [ERROR] com.haldiram.business.helper.t*
*est.SuspiciousActivityHelperTe**st*)

that you've cited, doesn't indicate any of the things like use
of 'Runtime.getRuntime().halt' or 'System.exit'. For the information, the
name 'SuspiciousActivityHelper' is a business name within my application,
and is not anything related to technical suspicious aspects within my
application or test codebases.

The issues that I've discussed within this thread, still causes the same
problems to me.




-- 
Regards,
Mukul Gandhi


Re: 'mvn clean test' crashes

2020-09-30 Thread Tibor Digana
Hi Mukul,

Sorry for my late reply.
I am checking pending emails.

Usually these errors appear in the test itself or the *libraries*.
As for instance, we found out that a Spring's library is implementing Kafka
stuff calling the "Runtime.getRuntime().halt(  )".
The same bad thing is to call the "System.exit()".
I have recognized this situation after I saw a crashed test in your logs.
The test is supposed to be crashed if the execution breaks abruptly without
receiving a JUnit/TestNG event about finishing the test, see this log:

*[ERROR] Crashed tests: [ERROR] com.haldiram.business.helper.t*
*est.SuspiciousActivityHelperTe**st*

T



On Tue, Jul 28, 2020 at 8:49 AM Mukul Gandhi  wrote:

> On Tue, Jul 7, 2020 at 5:49 PM Gary Gregory 
> wrote:
>
> > I've tried to deal with JVM crashes in the FailSafe (I was not having the
> > problem in SureFire) plugin by using:
> >
> >   
> > org.apache.maven.plugins
> > maven-failsafe-plugin
> > ${hmp.failsafe.version}
> > 
> >   1
> >   false
> > 
> >   
> >
>
> I also ran the command 'mvn verify', by exactly specifying above within my
> Maven project's pom.xml file (and specifying the version
> as 3.0.0-M5), 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
>


Re: 'mvn clean test' crashes

2020-07-28 Thread Mukul Gandhi
On Tue, Jul 7, 2020 at 5:49 PM Gary Gregory  wrote:

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

I also ran the command 'mvn verify', by exactly specifying above within my
Maven project's pom.xml file (and specifying the version
as 3.0.0-M5), 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


Re: 'mvn clean test' crashes

2020-07-27 Thread Mukul Gandhi
On Tue, Jul 7, 2020 at 5:49 PM Gary Gregory  wrote:

> I've tried to deal with JVM crashes in the FailSafe (I was not having the
> problem in SureFire) plugin by using:
>
>   
> org.apache.maven.plugins
> maven-failsafe-plugin
> ${hmp.failsafe.version}
> 
>   1
>   false
> 
>   
>
> 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,


 org.apache.maven.plugins
 maven-failsafe-plugin
 3.0.0-M5
 
  
  
  integration-test
  verify
  
  
  


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

Re: 'mvn clean test' crashes

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

  
org.apache.maven.plugins
maven-failsafe-plugin
${hmp.failsafe.version}

  1
  false

  

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  wrote:

> Hi Gary,
>
> On Sun, Jul 5, 2020 at 6:52 PM Gary Gregory 
> 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
>


Re: 'mvn clean test' crashes

2020-07-07 Thread Mukul Gandhi
Hi Gary,

On Sun, Jul 5, 2020 at 6:52 PM Gary Gregory  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


Re: 'mvn clean test' crashes

2020-07-05 Thread Mukul Gandhi
Hi Tibor,

On Sun, Jul 5, 2020 at 6:57 PM Tibor Digana  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,

   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.


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


Re: 'mvn clean test' crashes

2020-07-05 Thread 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  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  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 

Re: 'mvn clean test' crashes

2020-07-05 Thread Tibor Digana
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  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
>
> 

Re: 'mvn clean test' crashes

2020-07-05 Thread Gary Gregory
You could try to set the fork count to 1.

Gary

On Thu, Jul 2, 2020, 02:51 Mukul Gandhi  wrote:

> Hi Gary,
>
> On Wed, Jul 1, 2020 at 4:26 PM Gary Gregory 
> 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,
> 
> 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.
> 
>
> 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:
> -Djdk.net.URLClassPath.disableClassPathURLCheck=true*
>
> 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
>


Re: 'mvn clean test' crashes

2020-07-02 Thread Mukul Gandhi
Hi Gary,

On Wed, Jul 1, 2020 at 4:26 PM Gary Gregory  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,

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.


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:
-Djdk.net.URLClassPath.disableClassPathURLCheck=true*

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


Re: 'mvn clean test' crashes

2020-07-01 Thread Gary Gregory
Have you tried the more recent version of the Maven surefire plugin?

Gary

On Wed, Jul 1, 2020, 05:06 Bernd Eckenfels  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 
> Gesendet: Wednesday, July 1, 2020 10:47:45 AM
> An: Maven Users List 
> Betreff: Re: 'mvn clean test' crashes
>
> Hi Enrico,
>
> On Wed, Jul 1, 2020 at 1:13 PM Enrico Olivelli 
> 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
>


Re: 'mvn clean test' crashes

2020-07-01 Thread 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 
Gesendet: Wednesday, July 1, 2020 10:47:45 AM
An: Maven Users List 
Betreff: Re: 'mvn clean test' crashes

Hi Enrico,

On Wed, Jul 1, 2020 at 1:13 PM Enrico Olivelli  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


Re: 'mvn clean test' crashes

2020-07-01 Thread Mukul Gandhi
Hi Enrico,

On Wed, Jul 1, 2020 at 1:13 PM Enrico Olivelli  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


Re: 'mvn clean test' crashes

2020-07-01 Thread 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  ha scritto:

> Hi Enrico,
>
> On Wed, Jul 1, 2020 at 11:34 AM Enrico Olivelli 
> 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
>


Re: 'mvn clean test' crashes

2020-07-01 Thread Mukul Gandhi
Hi Enrico,

On Wed, Jul 1, 2020 at 11:34 AM Enrico Olivelli  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


Re: 'mvn clean test' crashes

2020-07-01 Thread Enrico Olivelli
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  ha scritto:

> Hi Enrico,
>
> On Wed, Jul 1, 2020 at 10:47 AM Enrico Olivelli 
> 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
>


Re: 'mvn clean test' crashes

2020-06-30 Thread Mukul Gandhi
Hi Bernd,

On Wed, Jul 1, 2020 at 10:50 AM Bernd Eckenfels 
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


Re: 'mvn clean test' crashes

2020-06-30 Thread Mukul Gandhi
Hi Enrico,

On Wed, Jul 1, 2020 at 10:47 AM Enrico Olivelli  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


Re: 'mvn clean test' crashes

2020-06-30 Thread Bernd Eckenfels
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 
Gesendet: Wednesday, July 1, 2020 7:08:50 AM
An: users@maven.apache.org 
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.NativeMetho

Re: 'mvn clean test' crashes

2020-06-30 Thread Enrico Olivelli
Mukul
Are you walking System.exit or System.halt in your tests?


Enrico


Il Mer 1 Lug 2020, 07:09 Mukul Gandhi  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
>
> 

'mvn clean test' crashes

2020-06-30 Thread 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