Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error retrieving Certificate from Default JKS in PI 7.1 WAS JAVA

Former Member
0 Kudos

Hi everyone.

I'm trying to retrieve a Certificate from the Default JKS of a WAS Java (PI 7.1).

Java code follows:

+InitialContext ctx = new InitialContext(ctxProp); +

Object o = (Object) ctx.lookup("keystore");

KeyStoreManager manager = (KeyStoreManager) o;

KeyStore keyStore = manager.getKeyStore("DEFAULT");

Certificate ret = ks.getCertificate("ProofCert");

While executing, following Exception arise:

incompatible with interface com.sap.aii.security.lib.KeyStoreManager:sap.com/PIC-WRAPPER-FD-EAR-library-loader

It seems that I need additional libraries:

I have imported that:

import java.security.KeyStore;

import java.security.cert.X509Certificate;

import com.sap.aii.security.lib.KeyStoreManager;

//import java.security.cert.Certificate;

Has anyone some Idea of what is happening? What addiotional libraries I need?

Java version is 5.

Regards,

2 REPLIES 2

Former Member
0 Kudos

Hello,

Did you find a solution for your problem? I'am facing the same problem for the moment.

Thanks in advance

Carla

0 Kudos

You need to import the following security libraries:

\usr\sap\<SID>\DVEBMGS00\j2ee\cluster\bin\ext\com.sap.aii.sec.lib\lib\com.sap.aii.sec.lib_api.jar

\usr\sap\<SID>\DVEBMGS00\j2ee\cluster\bin\ext\com.sap.aii.sec.lib\lib\private\com.sap.aii.sec.lib_core.jar

and all the libraries under "security.class".