java.lang.IllegalArgumentException: Error: test loader org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader not found
@wenytang-ms is already working on this.
Since Mar 6, 2026.
Assessment
This issue has not been assessed yet.
Description
I get the above exception in the Debug Console when trying to run unit tests. To be honest, I'm lost as to why.
redhat.java: 1.49.0
vscjava.vscode-java-test: 0.43.2
VS Code: 1.106.2
Full Stack:
java.lang.IllegalArgumentException: Error: test loader org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader not found:
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
NativeConstructorAccessorImpl.java:77
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
DelegatingConstructorAccessorImpl.java:45
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
Constructor.java:500
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
Constructor.java:481
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:372)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:367)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:311)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:226)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.lang.NoSuchMethodError: 'void org.junit.platform.commons.util.CollectionUtils.forEachInReverseOrder(java.util.List, java.util.function.Consumer)'
at org.junit.platform.launcher.core.LauncherConfigurationParameters$Builder.build(LauncherConfigurationParameters.java:143)
at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:129)
at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:112)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.<init>(JUnit5TestLoader.java:37)
... 10 more
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:377)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:367)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:311)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:226)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Test related configs from build.gradle:
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'junit', module: 'junit'
}
testCompile "org.mockito:mockito-core:2.+"
testCompileOnly 'junit:junit:4.13.2'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
Any idea what could be the culprit? Thx!
- Dominant language
- TypeScript
- Stars
- 340
- Forks
- 173
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-java-test
-
ai-triaged bug investigating junit test-discovery test-execution
Difficulty 4/5 3-5 days Newbie friendliness 42/100
microsoft/vscode-java-test#1897 · 1 comment ·
-
ai-triaged bug gradle high-priority test-execution
microsoft/vscode-java-test#1880 · 2 comments · 1 assignee ·
-
ai-triaged gradle junit test-execution ux
microsoft/vscode-java-test#1878 · 3 comments · 1 assignee ·
-
ai-triaged enhancement junit low-priority test-execution ui
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/vscode-java-test#1836 · 4 comments ·
-
ai-triaged enhancement gradle investigating junit low-priority test-reporting
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/vscode-java-test#1824 · 1 comment ·
All issues in microsoft/vscode-java-test
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/inspector#2458 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
carbon-design-system/ibm-products#9907 ·