{"record":{"id":"dc1cb38966ce2e9b","repo":"quarkusio/quarkus","slug":"failed-to-read-properties-from-propspath","errorCode":null,"errorMessage":"Failed to read properties from ${propsPath}","messagePattern":"Failed to read properties from (.+?)","errorType":"exception","errorClass":"AppModelResolverException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PlatformImportsImpl.java","lineNumber":112,"sourceCode":"        platformImports.computeIfAbsent(bomCoords, this::newPlatformImport).descriptorFound = true;\n    }\n\n    public void addPlatformProperties(String groupId, String artifactId, String classifier, String type, String version,\n            Path propsPath) throws AppModelResolverException {\n        final ArtifactCoords bomCoords = ArtifactCoords.pom(groupId,\n                artifactId.substring(0,\n                        artifactId.length() - BootstrapConstants.PLATFORM_PROPERTIES_ARTIFACT_ID_SUFFIX.length()),\n                version);\n        platformImports.computeIfAbsent(bomCoords, this::newPlatformImport);\n        importedPlatformBoms.computeIfAbsent(groupId, g -> new ArrayList<>());\n        if (!importedPlatformBoms.get(groupId).contains(bomCoords)) {\n            importedPlatformBoms.get(groupId).add(bomCoords);\n\n            final Properties props = new Properties();\n            try (InputStream is = Files.newInputStream(propsPath)) {\n                props.load(is);\n            } catch (IOException e) {\n                throw new AppModelResolverException(\"Failed to read properties from \" + propsPath, e);\n            }\n            for (Map.Entry<?, ?> prop : props.entrySet()) {\n                final String name = String.valueOf(prop.getKey());\n                if (name.startsWith(BootstrapConstants.PLATFORM_PROPERTY_PREFIX)) {\n                    if (isPlatformReleaseInfo(name)) {\n                        addPlatformRelease(name, String.valueOf(prop.getValue()));\n                    } else {\n                        collectedProps.putIfAbsent(name, String.valueOf(prop.getValue().toString()));\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * This method is meant to be called when a new platform BOM import was detected.\n     *\n     * @param bom platform BOM coordinates","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PlatformImportsImpl.java#L94-L130","documentation":"addPlatformProperties() imports platform metadata from a properties file at propsPath. If the file cannot be opened or read (missing, unreadable, I/O error), it wraps the IOException in AppModelResolverException with this message. The platform import cannot proceed without this file's contents.","triggerScenarios":"Calling addPlatformProperties / resolvePlatformImports / setUpPlatformConfiguration with a propsPath that does not exist or is not readable; the file was deleted or locked mid-read.","commonSituations":"Stale quarkus-platform properties path after a clean of the build directory; read-only CI workspace; path pointing to the wrong module's target directory; file removed by a concurrent build.","solutions":["Verify propsPath exists and is readable before importing (Files.isReadable)","Rebuild/refresh the project so the platform properties file is regenerated","Check the path passed to resolvePlatformImports points at the correct build output directory"],"exampleFix":"// before\nimports.addPlatformProperties(Path.of(\"target/missing-platform.properties\"), bomCoords);\n// after\nPath propsPath = Path.of(\"target/quarkus-platform.properties\");\nif (!Files.isReadable(propsPath)) {\n    throw new IllegalStateException(\"Platform properties missing: \" + propsPath);\n}\nimports.addPlatformProperties(propsPath, bomCoords);","handlingStrategy":"validation","validationCode":"if (propsPath == null || !Files.isRegularFile(propsPath) || !Files.isReadable(propsPath)) {\n    throw new IllegalStateException(\"Platform properties file missing or unreadable: \" + propsPath);\n}","typeGuard":null,"tryCatchPattern":"try {\n    imports.addPlatformProperties(propsPath, bomCoords);\n} catch (AppModelResolverException e) {\n    log.errorf(e, \"Cannot read platform properties at %s\", propsPath);\n    throw e;\n}","preventionTips":["Verify the file exists before resolving platform imports","Regenerate build output after mvn clean instead of reusing stale paths","Handle AppModelResolverException.getCause() (IOException) for clearer diagnostics"],"tags":["io","platform-imports","file-not-found"],"backgroundTag":"file-read-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}