cancel
Showing results for 
Search instead for 
Did you mean: 

PGP Encryption Error.

0 Kudos

Hi,


I am working on PO 7.4 single stack. My scenario is > Scenario is FILE to FTPS.

XML file to be picked up ---> Encryption is applied using AES_256 Algo ----> Bank FTPS server

I' getting the below error. In my case there is no ESR content and receiver side I'm using the PGP encryption.

MP: exception caught with cause javax.ejb.TransactionRolledbackLocalException: ASJ.ejb.005043 (Failed in component: sap.com/com.sap.aii.adapter.pgp.app, BC-XI-CON-B2B) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.aii.adapter.pgp.ejb.api.PGPEncryptionBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.aii.adapter.pgp.ejb.api.PGPEncryptionBean@3d2d4df1 for bean sap.com/com.sap.aii.adapter.pgp.app*xml|com.sap.aii.adapter.pgp.ejb.jar*xml|PGPEncryption in application sap.com/com.sap.aii.adapter.pgp.app.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable 'name'; nested exception is: javax.ejb.EJBException: ASJ.ejb.005043 (Failed in component: sap.com/com.sap.aii.adapter.pgp.app, BC-XI-CON-B2B) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.aii.adapter.pgp.ejb.api.PGPEncryptionBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.aii.adapter.pgp.ejb.api.PGPEncryptionBean@3d2d4df1 for bean sap.com/com.sap.aii.adapter.pgp.app*xml|com.sap.aii.adapter.pgp.ejb.jar*xml|PGPEncryption in application sap.com/com.sap.aii.adapter.pgp.app.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable 'name'; nested exception is: javax.ejb.EJBTransactionRolledbackException: ASJ.ejb.005043 (Failed in component: sap.com/com.sap.aii.adapter.pgp.app, BC-XI-CON-B2B) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.aii.adapter.pgp.ejb.api.PGPEncryptionBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.aii.adapter.pgp.ejb.api.PGPEncryptionBean@3d2d4df1 for bean sap.com/com.sap.aii.adapter.pgp.app*xml|com.sap.aii.adapter.pgp.ejb.jar*xml|PGPEncryption in application sap.com/com.sap.aii.adapter.pgp.app.; nested exception is: java.lang.NullPointerException: while trying to invoke the methodjava.lang.String.length() of a null object loaded from local variable 'name'; nested exception is: javax.ejb.EJBException: ASJ.ejb.005043 (Failed in component: sap.com/com.sap.aii.adapter.pgp.app, BC-XI-CON-B2B) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.aii.adapter.pgp.ejb.api.PGPEncryptionBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.aii.adapter.pgp.ejb.api.PGPEncryptionBean@3d2d4df1 for bean sap.com/com.sap.aii.adapter.pgp.app*xml|com.sap.aii.adapter.pgp.ejb.jar*xml|PGPEncryption in application sap.com/com.sap.aii.adapter.pgp.app.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable 'name'

Please find the below are the details. that I have configured.

applyCompression      - None

applyEncryption          - true

applySignature           - true

asciiArmored             - false

dynamicFileName      - FileName

dynamicNamespace   - http://sap.com/xi/XI/System/File

encryptionAlgo           -AES_256

format                       - text

keyRootPath             - usr/sap/<System ID>/<Instance ID>/sec

ownPrivateKey          - xxx.asc

partnerPublicKey       - xxx.asc

pwdOwnPrivateKey   - xxxxxxxxx

signingAlgo               - SHA256

useSecureStore        - false

Please help me out where I need to specify the name.

Regards,

Prabhakar.A

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor

Hi Prabhakar,

Have you checked whether you have Unlimited JCE policies this is mandatory.


Please check in this URL : https://host:port:/BC/VerifyJCE


and also if possible can u put screenshot of the module configuration it would be helpful


Br,

Manoj

0 Kudos

Hi Manoj,

I have resolved the above issue and now I'm getting the below error.

Exception caught by adapter framework: Could not process message, Internal PGP Error (org.bouncycastle.openpgp.PGPException: Exception creating cipher)


I have checked and I'm updating the JCE Unlimited Strength Jurisdiction Policy. I have too see once the system is restarted.


Regards,

Prabhakar.A


manoj_khavatkopp
Active Contributor
0 Kudos

Prabhakar ,

This error is due to unlimited JCE only update this an try again.

Br,

Manoj

nitindeshpande
Active Contributor
0 Kudos

Hi Prabhakar,

Have the PGP adapter module successfully deployed in the PI server? And i hope you have installed the SFTP-PGP Add-on provided by SAP or you have deployed a PGP module from some other vendor?

Regards,

Nitin

0 Kudos

Hi Nitin,

I have deployed the PGP adapter module successfully in the PI server. And we have installed the SFTP-PGP Add-on provided by SAP.

Regards,

Prabhakar.A

nitindeshpande
Active Contributor
0 Kudos

Hello Niraj,

Thanks for the information. If the PGP module is successfully installed, then the problem is due to the unlimited JCE as rightly suggested by Manoj.

Please refer to the below SCN threads for the resolution of your issue -

Regards,

Nitin

0 Kudos

HI Nitin,

I have already replied to Manoj and I'm doing the same. Thanks for your inputs.

Regards,

Prabhakar.A

0 Kudos

Hi,

Now PGP working fine. Can any one help out the 3rd party is expecting BANK*.PGP as the file name . But in my case its automatically taking INPUTFILENAME with timestamp. So there is no ESR in my scenario. How to achieve this. I have given the file name in Receiver CC config as below.

Regards,

Prabhakar.A

manoj_khavatkopp
Active Contributor
0 Kudos

I guess you have enabled ASMA parameters that is reason your file is taking your input filename.

Can you please be more specific what is the input file-name and what you are expecting in output , if i am not wrong you want to have an extension of .PGP is that right?

0 Kudos

Hi Manoj,

Thank you for your quick reply. my issue got resolved now its working as expected.

I have disabled the ASMA Parameters and removed the * also from the file name. If the * start is there then It will give the another error.

Im closing this issue now.

Regards,

Prabhakar.A

nitindeshpande
Active Contributor
0 Kudos

Hello Prabhakar,

You can use "*" (star) in your filename only when you are using dynamic filename configuration in ASMA and to use this you need to have a dynamic file configuration in your mapping.

Regards,

Nitin

Answers (0)