{"record":{"id":"ba952f5c6fb0bd6d","repo":"quarkusio/quarkus","slug":"failed-to-locate-quarkus-core-version-property-in","errorCode":null,"errorMessage":"Failed to locate quarkus-core-version property in the bundled quarkus.properties","messagePattern":"Failed to locate quarkus-core-version property in the bundled quarkus\\.properties","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"devtools/cli-common/src/main/java/io/quarkus/cli/common/VersionHelper.java","lineNumber":47,"sourceCode":"        if (\"file\".equals(quarkusPropertiesUrl.getProtocol()) || \"jar\".equals(quarkusPropertiesUrl.getProtocol())) {\n            ClassPathUtils.consumeAsPath(quarkusPropertiesUrl, p -> {\n                try (BufferedReader reader = Files.newBufferedReader(p)) {\n                    props.load(reader);\n                } catch (IOException e) {\n                    throw new RuntimeException(\"Failed to load quarkus.properties\", e);\n                }\n            });\n        } else {\n            try {\n                props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(\"quarkus.properties\"));\n            } catch (IOException e) {\n                throw new IllegalStateException(\"Failed to load quarkus.properties\", e);\n            }\n        }\n\n        version = props.getProperty(\"quarkus-core-version\");\n        if (version == null) {\n            throw new RuntimeException(\"Failed to locate quarkus-core-version property in the bundled quarkus.properties\");\n        }\n\n        return version;\n    }\n}\n","sourceCodeStart":29,"sourceCodeEnd":53,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/cli-common/src/main/java/io/quarkus/cli/common/VersionHelper.java#L29-L53","documentation":"After loading quarkus.properties from the classpath, VersionHelper.clientVersion() requires the quarkus-core-version key. If Properties.getProperty(\"quarkus-core-version\") returns null, it throws this RuntimeException. It means the bundled properties file loaded successfully but lacks the required version entry.","triggerScenarios":"Calling VersionHelper.clientVersion() when a quarkus.properties resource is found on the classpath but it does not contain a quarkus-core-version property — typically because a different/older quarkus.properties shadows the bundled one earlier on the classpath.","commonSituations":"A user or build placed a custom quarkus.properties in a directory on the classpath ahead of the CLI jars; a shaded/repackaged CLI jar that lost the generated version property; classpath pollution via CLASSPATH environment variable.","solutions":["Remove or rename any user-created quarkus.properties that shadows the bundled one on the classpath.","Reinstall the quarkus CLI so the original bundled quarkus.properties (with quarkus-core-version) is restored.","Inspect the resolved resource (getResource(\"quarkus.properties\")) and confirm it contains quarkus-core-version; fix the classpath ordering ( CLASSPATH env, -cp flags)."],"exampleFix":"// diagnose\nURL u = Thread.currentThread().getContextClassLoader().getResource(\"quarkus.properties\");\nSystem.out.println(\"resolved from: \" + u); // ensure this is the bundled jar, not a stray file\n// fix: remove the stray quarkus.properties from the classpath or reinstall the CLI","handlingStrategy":"validation","validationCode":"URL u = Thread.currentThread().getContextClassLoader().getResource(\"quarkus.properties\");\nProperties p = new Properties();\ntry (InputStream in = u.openStream()) { p.load(in); }\nif (p.getProperty(\"quarkus-core-version\") == null) {\n    System.err.println(\"Shadowed/broken quarkus.properties at: \" + u);\n}","typeGuard":null,"tryCatchPattern":"try {\n    String v = VersionHelper.clientVersion();\n} catch (RuntimeException e) {\n    // inspect which resource was resolved and reinstall the CLI\n}","preventionTips":["Never name your own file quarkus.properties on the CLI classpath.","Avoid polluting CLASSPATH env var with directories containing quarkus.properties.","Reinstall the CLI rather than hand-editing its jars."],"tags":["classpath","cli","missing-property"],"backgroundTag":"missing-classpath-resource-property","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}