Path for KeyStore file

May 11, 2011 at 6:10 PM

Hi rob,

We are looking to move the KEYSTORE file which has the private key to a location in the file system.

It looks like it is feasible to change the keystore.filename property in the hv-application.properties file to specify the fully qualified path for the keystore file.

However I have tried the following combinations and it does not seem to find the keystore file unless i keep it directly within the application classpath (in the /src folder)

keystore.filename= c:/guidewell/certificates/gw_keystore

keystore.filename= c:\guidewell\certificates\gw_keystore

keystore.filename= c:\\guidewell\\certificates\\gw_keystore

I used all these combinations - and I get the same exception. It works fine if I provide the keystore.filename = /gw_keystore.

Any help with this is much appreciated.

Caused by: com.microsoft.hsg.HVException: com.microsoft.hsg.HVSystemException: Could not get private key information
 at com.microsoft.hsg.ConnectionFactory.getConnection(ConnectionFactory.java:73)
 at com.microsoft.hsg.ConnectionFactory.getConnection(ConnectionFactory.java:84)
 at com.guidewell.services.phr.mshv.methods.MSHVGetThings.getAllThingsWithAudit(MSHVGetThings.java:61)
 at com.guidewell.services.phr.mshv.MSHVManager.importAllPhrRecords(MSHVManager.java:99)
 ... 85 more
Caused by: com.microsoft.hsg.HVSystemException: Could not get private key information
 at com.microsoft.hsg.DefaultPrivateKeyStore.initData(DefaultPrivateKeyStore.java:157)
 at com.microsoft.hsg.DefaultPrivateKeyStore.getPrivateKey(DefaultPrivateKeyStore.java:112)
 at com.microsoft.hsg.ApplicationAuthenticator.ensurePrivateKey(ApplicationAuthenticator.java:225)
 at com.microsoft.hsg.ApplicationAuthenticator.authenticate(ApplicationAuthenticator.java:137)
 at com.microsoft.hsg.ApplicationAuthenticator.authenticate(ApplicationAuthenticator.java:130)
 at com.microsoft.hsg.Connection.authenticate(Connection.java:164)
 at com.microsoft.hsg.Connection.authenticate(Connection.java:173)
 at com.microsoft.hsg.ConnectionFactory.getConnection(ConnectionFactory.java:67)
 ... 88 more
Caused by: com.microsoft.hsg.HVException: Key not found
 at com.microsoft.hsg.DefaultPrivateKeyStore.initData(DefaultPrivateKeyStore.java:143)
 ... 95 more

Coordinator
May 11, 2011 at 6:43 PM

The file is loaded with the Class.getResourceAsStream(filename) method.  It cannot load arbitrary paths, but instead will search through the Classpath. 

--Rob