Reputation: 467
I have this file structure;
Then on my beans xml config I have;
But when I start the server up I get a FileNotFoundException
/store/thestore.jks
What am I missing? Thanks in advance.
Upvotes: 1
Views: 3104
Reputation: 10653
According to source code here com.noelios.restlet.util.DefaultSslContextFactory.createSslContext()
190 FileInputStream keyStoreInputStream = null;
191 try {
192 keyStoreInputStream = ((this.keyStorePath != null) && (!"NONE"
193 .equals(this.keyStorePath))) ? new FileInputStream(
194 this.keyStorePath) : null;
195 keyStore.load(keyStoreInputStream, this.keyStorePassword);
It's using FileInputStream
, which means it will try to read file from the file system and not from the JAR itself.
You have to put jks
file outside JAR and provide absolute path to it.
For example
<prop key="keyStorePath">C:/store/thestore.jks</prop>
Upvotes: 2