{"record":{"id":"ef7ade6e6459ddfc","repo":"quarkusio/quarkus","slug":"path-certificatedirectory-is-not-a-direc","errorCode":null,"errorMessage":"Path '\" + certificateDirectory + \"' is not a directory. Paths pointing to the certificate files can be configured with the 'quarkus.tls.trust-store.pem.certs' property instead","messagePattern":"Path '\" \\+ certificateDirectory \\+ \"' is not a directory\\. Paths pointing to the certificate files can be configured with the 'quarkus\\.tls\\.trust-store\\.pem\\.certs' property instead","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/tls-registry/runtime/src/main/java/io/quarkus/tls/runtime/config/PemCertsConfig.java","lineNumber":98,"sourceCode":"                            e);\n                }\n            }\n        }\n\n        if (options.getCertValues().isEmpty()) {\n            throw new IllegalArgumentException(\"You must specify the key files and certificate files\");\n        }\n\n        return options;\n    }\n\n    private static DirectoryStream<Path> streamDirectory(Path certificateDirectory) {\n        if (Files.notExists(certificateDirectory)) {\n            throw new ConfigurationException(\"Configured certificate path does not exist:\" + certificateDirectory);\n        }\n\n        if (!Files.isDirectory(certificateDirectory)) {\n            throw new ConfigurationException(\"Path '\" + certificateDirectory + \"' is not a directory. Paths pointing \"\n                    + \"to the certificate files can be configured with the 'quarkus.tls.trust-store.pem.certs' property\"\n                    + \" instead\");\n        }\n\n        try {\n            return Files.newDirectoryStream(certificateDirectory);\n        } catch (IOException e) {\n            throw new RuntimeException(\"Failed to open DirectoryStream for configured certificate path \" + certificateDirectory,\n                    e);\n        }\n    }\n}\n","sourceCodeStart":80,"sourceCodeEnd":111,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/tls-registry/runtime/src/main/java/io/quarkus/tls/runtime/config/PemCertsConfig.java#L80-L111","documentation":"streamDirectory validates that each configured certificate path is a directory; a path that exists but is a regular file throws ConfigurationException telling you a file belongs in the pem.certs (files) property, not pem.certDirs (directories). The two properties have distinct semantics and are not interchangeable.","triggerScenarios":"quarkus.tls.<name>.trust-store.pem.certDirs points at a single .pem/.crt file instead of a directory containing certificate files.","commonSituations":"Mixing up certs vs certDirs semantics; copying the value from the certs property into certDirs; automation generating one file and configuring it as a directory; a symlink resolving to a file.","solutions":["Move the file path to quarkus.tls.<name>.trust-store.pem.certs (files list)","Or create a directory, put the certificates inside it, and point certDirs at the directory","Remember: certDirs expects directories whose files are ALL treated as PEM certs; certs expects explicit file paths"],"exampleFix":"// before\nquarkus.tls.trust-store.pem.certDirs=/etc/certs/ca.crt\n// after\nquarkus.tls.trust-store.pem.certs=/etc/certs/ca.crt\n# or\nquarkus.tls.trust-store.pem.certDirs=/etc/certs","handlingStrategy":"validation","validationCode":"for (Path p : certDirs) {\n    if (Files.exists(p) && !Files.isDirectory(p))\n        throw new IllegalStateException(\"certDirs expects a directory, got file: \" + p);\n}\n","typeGuard":null,"tryCatchPattern":"try {\n    options = pemCertsConfig.toOptions();\n} catch (ConfigurationException e) {\n    throw new IllegalStateException(\"certDirs/certs misuse: \" + e.getMessage(), e);\n}","preventionTips":["certDirs = directories; certs = individual file paths — never mix","If automation generates a single file, configure it via pem.certs instead","Resolve symlinks when validating paths (Files.isSymbolicLink)"],"tags":["quarkus","tls-registry","configuration","wrong-path-type"],"backgroundTag":"config-path-not-found","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"}