Skip to Content
avatar image
Former Member

Custom Adapter Module - Privatekey Access

I've a requirement to store the message content into a file in SFTP server.  Have created a custom adapter module to do so.  We have a mandatory requirement to use of privatekey to connect with SFTP server (do not have access to uid/pwd).  Have followed below post to try accessing private keys.

I'm passing view name and alias name to retrieve privatekey stored in PI 73 server.

When I use my custom adapter module with Seeburger Sender CC, privatekey is accessible.  However, I'm not able access privatekey from any other Adapter (ex.  standard File adapter) CC or even with Seeburger Receiver CC. 

Custom adapter module is running using <SID>adm userid. I don't know if we should run the adapter module with any specific userid to get access to privatekey.  Appreciate anyone helping to find a solution for this issue.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 01, 2014 at 11:41 PM

    It'll be fastest to add some logging messages and trace the error.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 02, 2014 at 02:03 AM

    Hi Sat,

    Please share the code too.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Below is the code:  highlihted exception is getting thrown when trying to read the keystore value.

      {rest of the code can be found in }

          public KeyStore getKeystore(String view) throws ResourceException {

           final String SIGNATURE = "getKeystore()";


           KeyStore keystore;

           try {

               if (keystores.containsKey(view) == true) {

                keystore = keystores.get(view);

               } else {

                keystore = keystoreManager.getKeyStore(view);

                if (keystore == null) {

                    throw new ResourceException("Keystore not found. view=" + view);


                keystores.put(view, keystore);



               return keystore;

           } catch (KeyStoreException e) {

               //TRACE.catching(SIGNATURE, e);

               throw new ResourceException(e);



      Any help is appreciated.