need to configure an SSO using digital certificate between the client portal and a third party.To configure the SSO I have received the public key of the third party and able to access it from server location.Now I have to access priavte key of the client to sign it.I have created an abstract portal component and written the below code to fetch the Priavte key from my project folder.I have the certificate in project folder,after acessing the file from project it gives the below error.

String fielPath1 = request.getPublicResourcePath()+"/SAPLogonTicketKeypair-cert1.cer";
FileInputStream ksfis = new FileInputStream(fielPath1);
KeyStore ks = KeyStore.getInstance("JKS");
ks.load(null, sPass.toCharArray());
response.write(" Private key store type"+ ks);
response.write(" ksfis "+ ksfis);
BufferedInputStream ksbufin = new BufferedInputStream(ksfis);
response.write(" ksbufin"+ ksbufin);
ks.load(ksbufin, sPass.toCharArray());
PrivateKey priv = (PrivateKey) ks.getKey(alias, kPass.toCharArray());
response.write(" Private key access"+ priv);

I get the below error:

Error Invalid keystore d( KeyStore$JKS.engineLoad( security.KeyStore.load( pc.doContent( rtal.prt.component.AbstractPortalComponent.service Deprecated(

Please let me know how to pass the filepath to extract the priavte key from the server itself.