spring-projects/spring-boot · error · IllegalStateException
Error creating KeyStore: ${ex.getMessage()}
Error message
Error creating KeyStore: ${ex.getMessage()} What it means
Error "Error creating KeyStore: ${ex.getMessage()}" thrown in spring-projects/spring-boot.
Source
Thrown at buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ssl/KeyStoreFactory.java:68
* @param alias the alias to use for KeyStore entries
* @return the {@code KeyStore}
*/
static KeyStore create(Path certPath, @Nullable Path keyPath, String alias) {
try {
KeyStore keyStore = getKeyStore();
String certificateText = Files.readString(certPath);
List<X509Certificate> certificates = PemCertificateParser.parse(certificateText);
PrivateKey privateKey = getPrivateKey(keyPath);
try {
addCertificates(keyStore, certificates.toArray(X509Certificate[]::new), privateKey, alias);
}
catch (KeyStoreException ex) {
throw new IllegalStateException("Error adding certificates to KeyStore: " + ex.getMessage(), ex);
}
return keyStore;
}
catch (GeneralSecurityException | IOException ex) {
throw new IllegalStateException("Error creating KeyStore: " + ex.getMessage(), ex);
}
}
private static KeyStore getKeyStore()
throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException {
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(null);
return keyStore;
}
private static @Nullable PrivateKey getPrivateKey(@Nullable Path path) throws IOException {
if (path != null && Files.exists(path)) {
String text = Files.readString(path);
return PemPrivateKeyParser.parse(text);
}
return null;
}
View on GitHub (pinned to 5b2dbdbb8b)
When it happens
Trigger: Thrown at buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ssl/KeyStoreFactory.java:68 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of spring-projects/spring-boot@5b2dbdbb8b (2026-08-04).
Data as JSON: /data/errors/95c0297ee365c8aa.json.
Report an issue: GitHub.