Repository navigation
Tracking: existing JUnit Platform 1.x standalone projects routed to JUnit 6 until redhat.java picks up JDT fix #1873
Description
Summary
This issue tracks the remaining end-to-end failure for existing projects that already reference junit-platform-console-standalone-1.13.x.jar.
Symptom:
- Tests are discovered.
- Running them uses the JDT JUnit 6 runner path, for example
org.eclipse.jdt.internal.junit6.runner.JUnit6TestReference. - The run fails with:
java.lang.NoClassDefFoundError: org/junit/platform/engine/CancellationToken
That means a JUnit Platform 1.x standalone jar, which bundles Jupiter 5.x, is being launched through the JUnit 6 runner.
Expected behavior
Existing projects using junit-platform-console-standalone-1.13.x should continue to run as JUnit 5 projects. Users should not have to migrate existing projects to JUnit Jupiter 6 just because the VS Code Java extensions were updated.
Current status
vscode-java-test side changes are done:
- fix: use maven-metadata.xml to look up latest test framework version #1868 / Test Runner for Java Extension downloads old JUnit standalone #1866:
Enable Java Testsnow usesmaven-metadata.xmlinstead of the stale Maven search index, and JUnit Jupiter 5 and JUnit Jupiter 6 are separate choices. - fix: ship org.objectweb.asm bundles to satisfy Jacoco 0.8.14 (#1866) #1872: the extension now ships the ASM bundles required by the test plugin/Jacoco startup path.
Upstream JDT source fix is also merged:
- CoreTestSearchEngine.findAnnotations() fails to find @Testable in standalone/fat Multi-Release JARs eclipse-jdt/eclipse.jdt.ui#2959
- Use bundled Jupiter version for JUnit platform console standalone JARs eclipse-jdt/eclipse.jdt.ui#2960
That JDT fix detects junit-platform-console-standalone-* jars using the manifest Engine-Version-junit-jupiter entry, so a 1.13.x standalone jar is classified as Jupiter 5.x instead of being treated as JUnit 6.
Remaining release-chain step:
- JDT-LS picks up the JDT fix.
redhat.javaships a build containing that JDT-LS update.- Users update
redhat.javaand verify existing1.13.xstandalone projects run through the JUnit 5 path.
Until that build is available, users can still hit the CancellationToken failure even with the latest vscode-java-test.
Workarounds
- If existing project dependencies must stay unchanged, stay on
redhat.java1.53 for now. - If changing project dependencies is acceptable, replace the old standalone jar with JUnit Jupiter 6 by running Enable Java Tests again and choosing JUnit Jupiter 6.
Closure criteria
Close this issue only after a redhat.java build containing the JDT/JDT-LS fix is available and an existing project using junit-platform-console-standalone-1.13.x is verified to run with the JUnit 5 runner.
Related
- Cannot run JUnit tests since v1.54.0 redhat-developer/vscode-java#4396
- Test Runner for Java Extension downloads old JUnit standalone #1866
- fix: use maven-metadata.xml to look up latest test framework version #1868
- fix: ship org.objectweb.asm bundles to satisfy Jacoco 0.8.14 (#1866) #1872
- CoreTestSearchEngine.findAnnotations() fails to find @Testable in standalone/fat Multi-Release JARs eclipse-jdt/eclipse.jdt.ui#2959
- Use bundled Jupiter version for JUnit platform console standalone JARs eclipse-jdt/eclipse.jdt.ui#2960
Activity
github-actions commentedon Jun 9, 2026
Hi wenyt (@wenytang-ms), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Workarounds
Next Steps
junit-platform-console-standalone-1.13.xwill automatically run via the JUnit 5 runner and avoid theCancellationTokenerror.Key References
maven-metadata.xmlfor JUnit version detectionTest Runner for Java Extension downloads old JUnit standalone #1866
fix: use maven-metadata.xml to look up latest test framework version #1868
fix: ship org.objectweb.asm bundles to satisfy Jacoco 0.8.14 (#1866) #1872
junit-platform-console-standalone-*via manifest entryCoreTestSearchEngine.findAnnotations() fails to find @Testable in standalone/fat Multi-Release JARs eclipse-jdt/eclipse.jdt.ui#2959
Use bundled Jupiter version for JUnit platform console standalone JARs eclipse-jdt/eclipse.jdt.ui#2960
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
wenytang-ms commentedon Jun 25, 2026
Verified against the new redhat.java 1.55 bits from https://github.com/redhat-developer/vscode-java/actions/runs/28102068371
Validation details:
1.59.0.202606241329andorg.eclipse.jdt.junit.core_3.14.300.v20260530-0929.jar.CoreTestSearchEngine.classin that bundle contains the standalone-JAR fix paths:Engine-Version-junit-jupiter,junit-platform-console-standalone, andgetJUnitVersionFromManifest..project/.classpath) referencingjunit-platform-console-standalone-1.13.4.jar.MinMaxTestastestKind: 0(JUnit 5), nottestKind: 3(JUnit 6), and discovered the test method successfully.CancellationToken,NoClassDefFoundError,JUnit6TestReference, or the oldCannot find org.junit.platform.commons.annotation.Testablefailure.So the release-chain dependency for this issue is satisfied in these 1.55 bits: existing
junit-platform-console-standalone-1.13.xprojects are no longer misclassified as JUnit 6 by JDT-LS. We can close this once redhat.java 1.55 is published/available to users.wenytang-ms commentedon Jun 26, 2026