JUnit execution fails with InaccessibleObjectException: Unable to make public void ...() accessible: module ... does not "exports ..." to unnamed module #2409
Labels
needinfo
Further information is requested
Problem
I am using the JPMS (Java Platform Module System) in my OSS project.
Now I stumbled over a bug in Eclipse preventing my JUnit test to work:
src/main/java
and therefore cannot be exported inmodule-info.java
@Test
method doing some generic tests to be covered by all extended test cases.The error is that I get this unexpected stacktrace:
Links
Hints
Please note that
mvn
viamaven-surefire-plugin
does not cause this error and in the terminal, I can run my tests successfully withmvn test
. As it seemsmvn
had the same bug but it has been fixed many years ago: https://issues.apache.org/jira/browse/SUREFIRE-1909So maybe using
add-opens
could help to fix this.Environment
The text was updated successfully, but these errors were encountered: