{"id":"f9e1b1321470dca0","repo":"junit-team/junit5","slug":"invalid-classpath-entry-path","errorCode":null,"errorMessage":"Invalid classpath entry: ${path}","messagePattern":"Invalid classpath entry: (.+?)","errorType":"exception","errorClass":"JUnitException","httpStatus":null,"severity":"error","filePath":"junit-platform-console/src/main/java/org/junit/platform/console/command/ConsoleTestExecutor.java","lineNumber":183,"sourceCode":"\t\tlauncher.execute(executionRequest);\n\t}\n\n\tprivate @Nullable CustomClassLoader createCustomClassLoader() {\n\t\tList<Path> additionalClasspathEntries = discoveryOptions.getExistingAdditionalClasspathEntries();\n\t\tif (!additionalClasspathEntries.isEmpty()) {\n\t\t\tURL[] urls = additionalClasspathEntries.stream().map(this::toURL).toArray(URL[]::new);\n\t\t\tClassLoader parentClassLoader = ClassLoaderUtils.getDefaultClassLoader();\n\t\t\treturn new CustomClassLoader(URLClassLoader.newInstance(urls, parentClassLoader));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprivate URL toURL(Path path) {\n\t\ttry {\n\t\t\treturn path.toUri().toURL();\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tthrow new JUnitException(\"Invalid classpath entry: \" + path, ex);\n\t\t}\n\t}\n\n\tprivate SummaryGeneratingListener registerListeners(PrintWriter out, Optional<Path> reportsDir, Launcher launcher,\n\t\t\t@Nullable CancellationToken cancellationToken) {\n\n\t\t// always register summary generating listener\n\t\tSummaryGeneratingListener summaryListener = new SummaryGeneratingListener();\n\t\tlauncher.registerTestExecutionListeners(summaryListener);\n\t\t// optionally, register test plan execution details printing listener\n\t\tcreateDetailsPrintingListener(out).ifPresent(launcher::registerTestExecutionListeners);\n\t\t// optionally, register XML reports writing listener\n\t\tcreateXmlWritingListener(out, reportsDir).ifPresent(launcher::registerTestExecutionListeners);\n\t\tcreateFailFastListener(cancellationToken).ifPresent(launcher::registerTestExecutionListeners);\n\t\treturn summaryListener;\n\t}\n\n\tprivate Optional<DetailsPrintingListener> createDetailsPrintingListener(PrintWriter out) {","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/junit-team/junit5/blob/956246301e03d757539f7b76dd5a91f298637563/junit-platform-console/src/main/java/org/junit/platform/console/command/ConsoleTestExecutor.java#L165-L201","documentation":"Error \"Invalid classpath entry: ${path}\" thrown in junit-team/junit5.","triggerScenarios":"Thrown at junit-platform-console/src/main/java/org/junit/platform/console/command/ConsoleTestExecutor.java:183 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"956246301e03d757539f7b76dd5a91f298637563","analyzedAt":"2026-08-04T19:25:17.049Z","schemaVersion":2}