java.lang.IllegalStateException: Cannot load keys from store: file [/Users/dturanski/dev/spring-cloud-config-demo/my-service/src/main/resources/server.jks]

Hot problem!
This exception has a lot of traffic. You can help 11 users by writing a short tip.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by dturanski
, 1 year ago
Cannot load keys from store: file [/Users/dturanski/dev/spring-cloud-config-demo/my-service/src/main/resources/server.jks]
via GitHub by beku8
, 2 years ago
Cannot load keys from store: class path resource [server.jks]
java.lang.IllegalStateException: Cannot load keys from store: file [/Users/dturanski/dev/spring-cloud-config-demo/my-service/src/main/resources/server.jks]
at sun.security.provider.KeyProtector.recover(KeyProtector.java:328)
at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:146)
at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:56)
at sun.security.provider.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:96)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetKey(JavaKeyStore.java:70)
at java.security.KeyStore.getKey(KeyStore.java:1023)
at org.springframework.security.rsa.crypto.KeyStoreKeyFactory.getKeyPair(KeyStoreKeyFactory.java:57)
at org.springframework.security.rsa.crypto.KeyStoreKeyFactory.getKeyPair(KeyStoreKeyFactory.java:44)
at org.springframework.cloud.cli.command.encrypt.BaseEncryptOptionHandler.createEncryptor(BaseEncryptOptionHandler.java:78)
at org.springframework.cloud.cli.command.encrypt.EncryptCommand$EncryptOptionHandler.run(EncryptCommand.java:58)
at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:91)
at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54)
at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219)
at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.