Skip to Content
avatar image
Former Member

Error retrieving Certificate from Default JKS in PI 7.1 WAS JAVA

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Feb 06, 2009 at 12:21 PM

    Hello,

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

    Thanks in advance

    Carla

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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".