junit-team/junit5 · error · JUnitException
Invalid classpath entry: ${path}
Error message
Invalid classpath entry: ${path} What it means
Error "Invalid classpath entry: ${path}" thrown in junit-team/junit5.
Source
Thrown at junit-platform-console/src/main/java/org/junit/platform/console/command/ConsoleTestExecutor.java:183
launcher.execute(executionRequest);
}
private @Nullable CustomClassLoader createCustomClassLoader() {
List<Path> additionalClasspathEntries = discoveryOptions.getExistingAdditionalClasspathEntries();
if (!additionalClasspathEntries.isEmpty()) {
URL[] urls = additionalClasspathEntries.stream().map(this::toURL).toArray(URL[]::new);
ClassLoader parentClassLoader = ClassLoaderUtils.getDefaultClassLoader();
return new CustomClassLoader(URLClassLoader.newInstance(urls, parentClassLoader));
}
return null;
}
private URL toURL(Path path) {
try {
return path.toUri().toURL();
}
catch (Exception ex) {
throw new JUnitException("Invalid classpath entry: " + path, ex);
}
}
private SummaryGeneratingListener registerListeners(PrintWriter out, Optional<Path> reportsDir, Launcher launcher,
@Nullable CancellationToken cancellationToken) {
// always register summary generating listener
SummaryGeneratingListener summaryListener = new SummaryGeneratingListener();
launcher.registerTestExecutionListeners(summaryListener);
// optionally, register test plan execution details printing listener
createDetailsPrintingListener(out).ifPresent(launcher::registerTestExecutionListeners);
// optionally, register XML reports writing listener
createXmlWritingListener(out, reportsDir).ifPresent(launcher::registerTestExecutionListeners);
createFailFastListener(cancellationToken).ifPresent(launcher::registerTestExecutionListeners);
return summaryListener;
}
private Optional<DetailsPrintingListener> createDetailsPrintingListener(PrintWriter out) {View on GitHub (pinned to 956246301e)
When it happens
Trigger: Thrown at junit-platform-console/src/main/java/org/junit/platform/console/command/ConsoleTestExecutor.java:183 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of junit-team/junit5@956246301e (2026-08-04).
Data as JSON: /data/errors/f9e1b1321470dca0.json.
Report an issue: GitHub.