You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Achim Zielesny <ac...@googlemail.com.INVALID> on 2021/03/08 18:11:55 UTC

[java] JUnit 4 tests lead to "Forked Java VM exited abnormally"

Dear NetBeans-Community,

the migration of several Java 8 projects from NetBeans 8.2 to Apache
NetBeans 12.1/AdoptOpenJDK 11 worked very well and successfully. Only the
JUnit tests (we still use junit-4.10.jar) do unfortunately no longer seem
to work: A "Test file" or "Debug Test File" now generates an error message:

Forked Java VM exited abnormally. Please note the time in the report does
not reflect the time until the VM exit.
junit.framework.AssertionFailedError
at jdk.internal.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.util.Vector.forEach(Vector.java:1388)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)

We feel a little lost - so any hints are highly appreciated!

Many thanks in advance and best regards,
Achim

-- 
Prof. Dr. Achim Zielesny

Westphalian University of Applied Sciences
Institute for Bioinformatics and Chemoinformatics
August-Schmidt-Ring 10
D-45665 Recklinghausen, Germany
www.w-hs.de

E-Mail: achim.zielesny@w-hs.de / achim.zielesny@googlemail.com
Website:
https://www.w-hs.de/service/informationen-zur-person/person/zielesny/

Fwd: Fwd: [java] JUnit 4 tests lead to "Forked Java VM exited abnormally"

Posted by Achim Zielesny <ac...@googlemail.com.INVALID>.
Dear Laszlo,

thanks again for the immediate help!

It seems to be a problem with the (package) locations of the test classes,
not the test code itself: If we shift the test classes to default NetBeans
locations (supported by the test code creation of the IDE) the tests work
without problems.

Best regards,
Achim


---------- Forwarded message ---------
Von: Laszlo Kishalmi <la...@gmail.com>
Date: Di., 9. März 2021 um 17:37 Uhr
Subject: Re: Fwd: [java] JUnit 4 tests lead to "Forked Java VM exited
abnormally"
To: <us...@netbeans.apache.org>


Well, I'd debug this one: Testcase:
de.gnwi.mfsim.model.graphics.body.test.TestBodySphere:null:    Caused an
ERROR

There is something null in there. Unfortunately I can't tell anything much
closer than that.


On 3/9/21 5:58 AM, Achim Zielesny wrote:

Dear Laszlo,

thanks a lot! We collected the extensive debug-log output in a text file (
available at https://w-hs.sciebo.de/s/uXUkqsDl0lhono0 ) - and now feel a
little more lost. Again, any additional hint is highly appreciated - and
many thanks in advance!

Best regards,
Achim

---------- Forwarded message ---------
Von: Laszlo Kishalmi <la...@gmail.com>
Date: Mo., 8. März 2021 um 20:09 Uhr
Subject: Re: [java] JUnit 4 tests lead to "Forked Java VM exited abnormally"
To: <us...@netbeans.apache.org>


You might need to check the VM args in the test, sometimes it passes some
bootclasspath related arguments which got removed from newer JDK-s, That
could result such an error. I'd recommed to switch on debug logging and
check how the JVM is being invoked.


On 3/8/21 10:11 AM, Achim Zielesny wrote:

Dear NetBeans-Community,

the migration of several Java 8 projects from NetBeans 8.2 to Apache
NetBeans 12.1/AdoptOpenJDK 11 worked very well and successfully. Only the
JUnit tests (we still use junit-4.10.jar) do unfortunately no longer seem
to work: A "Test file" or "Debug Test File" now generates an error message:

Forked Java VM exited abnormally. Please note the time in the report does
not reflect the time until the VM exit.
junit.framework.AssertionFailedError
at jdk.internal.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.util.Vector.forEach(Vector.java:1388)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)

We feel a little lost - so any hints are highly appreciated!

Many thanks in advance and best regards,
Achim

-- 
Prof. Dr. Achim Zielesny

Westphalian University of Applied Sciences
Institute for Bioinformatics and Chemoinformatics
August-Schmidt-Ring 10
D-45665 Recklinghausen, Germany
www.w-hs.de

E-Mail: achim.zielesny@w-hs.de / achim.zielesny@googlemail.com
Website:
https://www.w-hs.de/service/informationen-zur-person/person/zielesny/

Re: Fwd: [java] JUnit 4 tests lead to "Forked Java VM exited abnormally"

Posted by Laszlo Kishalmi <la...@gmail.com>.
Well, I'd debug this one: Testcase: 
de.gnwi.mfsim.model.graphics.body.test.TestBodySphere:null: Caused an ERROR

There is something null in there. Unfortunately I can't tell anything 
much closer than that.


On 3/9/21 5:58 AM, Achim Zielesny wrote:
> Dear Laszlo,
>
> thanks a lot! We collected the extensive debug-log output in a text 
> file ( available at https://w-hs.sciebo.de/s/uXUkqsDl0lhono0 
> <https://w-hs.sciebo.de/s/uXUkqsDl0lhono0> ) - and now feel a little 
> more lost. Again, any additional hint is highly appreciated - and many 
> thanks in advance!
>
> Best regards,
> Achim
>
> ---------- Forwarded message ---------
> Von: *Laszlo Kishalmi* <laszlo.kishalmi@gmail.com 
> <ma...@gmail.com>>
> Date: Mo., 8. März 2021 um 20:09 Uhr
> Subject: Re: [java] JUnit 4 tests lead to "Forked Java VM exited 
> abnormally"
> To: <users@netbeans.apache.org <ma...@netbeans.apache.org>>
>
>
> You might need to check the VM args in the test, sometimes it passes 
> some bootclasspath related arguments which got removed from newer 
> JDK-s, That could result such an error. I'd recommed to switch on 
> debug logging and check how the JVM is being invoked.
>
>
> On 3/8/21 10:11 AM, Achim Zielesny wrote:
>> Dear NetBeans-Community,
>>
>> the migration of several Java 8 projects from NetBeans 8.2 to Apache 
>> NetBeans 12.1/AdoptOpenJDK 11 worked very well and successfully. Only 
>> the JUnit tests (we still use junit-4.10.jar) do unfortunately no 
>> longer seem to work: A "Test file" or "Debug Test File" now generates 
>> an error message:
>>
>> Forked Java VM exited abnormally. Please note the time in the report 
>> does not reflect the time until the VM exit.
>> junit.framework.AssertionFailedError
>> at jdk.internal.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
>> at 
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.base/java.util.Vector.forEach(Vector.java:1388)
>> at 
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
>> Method)
>> at 
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> at 
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at 
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
>> Method)
>> at 
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> at 
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at 
>> org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)
>>
>> We feel a little lost - so any hints are highly appreciated!
>>
>> Many thanks in advance and best regards,
>> Achim
>>
>> -- 
>> Prof. Dr. Achim Zielesny
>>
>> Westphalian University of Applied Sciences
>> Institute for Bioinformatics and Chemoinformatics
>> August-Schmidt-Ring 10
>> D-45665 Recklinghausen, Germany
>> www.w-hs.de <http://www.w-hs.de>
>>
>> E-Mail: achim.zielesny@w-hs.de <ma...@w-hs.de> / 
>> achim.zielesny@googlemail.com <ma...@googlemail.com>
>> Website: 
>> https://www.w-hs.de/service/informationen-zur-person/person/zielesny/ 
>> <https://www.w-hs.de/service/informationen-zur-person/person/zielesny/>

Fwd: [java] JUnit 4 tests lead to "Forked Java VM exited abnormally"

Posted by Achim Zielesny <ac...@googlemail.com.INVALID>.
Dear Laszlo,

thanks a lot! We collected the extensive debug-log output in a text file (
available at https://w-hs.sciebo.de/s/uXUkqsDl0lhono0 ) - and now feel a
little more lost. Again, any additional hint is highly appreciated - and
many thanks in advance!

Best regards,
Achim

---------- Forwarded message ---------
Von: Laszlo Kishalmi <la...@gmail.com>
Date: Mo., 8. März 2021 um 20:09 Uhr
Subject: Re: [java] JUnit 4 tests lead to "Forked Java VM exited abnormally"
To: <us...@netbeans.apache.org>


You might need to check the VM args in the test, sometimes it passes some
bootclasspath related arguments which got removed from newer JDK-s, That
could result such an error. I'd recommed to switch on debug logging and
check how the JVM is being invoked.


On 3/8/21 10:11 AM, Achim Zielesny wrote:

Dear NetBeans-Community,

the migration of several Java 8 projects from NetBeans 8.2 to Apache
NetBeans 12.1/AdoptOpenJDK 11 worked very well and successfully. Only the
JUnit tests (we still use junit-4.10.jar) do unfortunately no longer seem
to work: A "Test file" or "Debug Test File" now generates an error message:

Forked Java VM exited abnormally. Please note the time in the report does
not reflect the time until the VM exit.
junit.framework.AssertionFailedError
at jdk.internal.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.util.Vector.forEach(Vector.java:1388)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)

We feel a little lost - so any hints are highly appreciated!

Many thanks in advance and best regards,
Achim

-- 
Prof. Dr. Achim Zielesny

Westphalian University of Applied Sciences
Institute for Bioinformatics and Chemoinformatics
August-Schmidt-Ring 10
D-45665 Recklinghausen, Germany
www.w-hs.de

E-Mail: achim.zielesny@w-hs.de / achim.zielesny@googlemail.com
Website:
https://www.w-hs.de/service/informationen-zur-person/person/zielesny/

Re: [java] JUnit 4 tests lead to "Forked Java VM exited abnormally"

Posted by Laszlo Kishalmi <la...@gmail.com>.
You might need to check the VM args in the test, sometimes it passes 
some bootclasspath related arguments which got removed from newer JDK-s, 
That could result such an error. I'd recommed to switch on debug logging 
and check how the JVM is being invoked.


On 3/8/21 10:11 AM, Achim Zielesny wrote:
> Dear NetBeans-Community,
>
> the migration of several Java 8 projects from NetBeans 8.2 to Apache 
> NetBeans 12.1/AdoptOpenJDK 11 worked very well and successfully. Only 
> the JUnit tests (we still use junit-4.10.jar) do unfortunately no 
> longer seem to work: A "Test file" or "Debug Test File" now generates 
> an error message:
>
> Forked Java VM exited abnormally. Please note the time in the report 
> does not reflect the time until the VM exit.
> junit.framework.AssertionFailedError
> at jdk.internal.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
> at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.util.Vector.forEach(Vector.java:1388)
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)
>
> We feel a little lost - so any hints are highly appreciated!
>
> Many thanks in advance and best regards,
> Achim
>
> -- 
> Prof. Dr. Achim Zielesny
>
> Westphalian University of Applied Sciences
> Institute for Bioinformatics and Chemoinformatics
> August-Schmidt-Ring 10
> D-45665 Recklinghausen, Germany
> www.w-hs.de <http://www.w-hs.de>
>
> E-Mail: achim.zielesny@w-hs.de <ma...@w-hs.de> / 
> achim.zielesny@googlemail.com <ma...@googlemail.com>
> Website: 
> https://www.w-hs.de/service/informationen-zur-person/person/zielesny/ 
> <https://www.w-hs.de/service/informationen-zur-person/person/zielesny/>