cancel
Showing results for 
Search instead for 
Did you mean: 

Getting exception in PGPEncryption module in SOAP Adapter

Former Member
0 Kudos

Dear Experts,

I 'm getting the below exception in SOAP adapter while I'm encrypting the data by using PGPEncryption module in adapter.


Exception caught by adapter framework: 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@1a906533 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';


> Scenario is SFTP to SOAP.

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


Here are the parameters used in channel configuration.


localejbs/PGPEncryption - Local Enterprise Bean

applyCompression - None

applyEncryption - true

applySignature - true

asciiArmored - false

dynamicFileName - FileName

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

encryptionAlgo -AES_256

ownPrivateKey - xxx.asc

partnerPublicKey - xxx.asc

pwdOwnPrivateKey - xxxxxxxxx

signingAlgo - SHA256


I've checked in forum but couldn't find the solution on this issue. Kindly suggest.


Thanks & Regards,

Naresh. K

Accepted Solutions (0)

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Naresh,

According with Ravi suggestion try to set keyRootPath - Path, to set the path of your files.

Regards.

Former Member
0 Kudos

Dear Inaki Vila/Ravi,

Custom module has been created in PI as bank is unable to decode our messages. Trust, rootpath is not needed. As updated in my prior post, we are able to deliver the files to same bank with same configuration values in another payment flow. Please find below the module configuration parameters.

Thanks & Regards,

Naresh. K

iaki_vila
Active Contributor
0 Kudos

Hi Naresh,

If you have the keys placed in usr/sap/<System ID>/<Instance ID>/sec () you would not need to set the keyRootPath.

If you pay attention to your exception " java.lang.String.length() of a null object loaded from local variable 'name" seems to be a variable name typo error (your configuration seems to be right for me) or any of the files can't be read, accessed or something similar.

Regards.

Former Member
0 Kudos

Dear Experts,

Please be informed, This issue has been fixed by changing the namespace [Same dynamicNamespace value maintained under module in SOAP channel] in SFTP sender communication channel. By default system takes [http://sap.com/xi/XI/System]. Find below the snapshot.

Thank you all for your valuable inputs.


Thanks & Regards,

Naresh.K

ravicarpenter
Active Participant
0 Kudos

Hi,

The public key for encryption needs to be placed in the security folder (sec) on the PI server. Please ask your basis to place the file for you. Afterwards in the module configuration, for the parameter partnerPublicKey provide the entire path of the sec folder where the public key is placed. Request you to check the blogs for the exact syntax and configuration of the public key path.

Former Member
0 Kudos

Dear Ravi,

Thanks for your response.

I've checked with Basis team and everything is fine at server side. Please be informed, we've another payroll interface and it is working with same configuration. Messages are processed successful to Bank server. But, this is new interface and wouldn't be able to post the messages to same bank using same parameter values.

Regards,

Naresh. K

ravicarpenter
Active Participant
0 Kudos

Hi,

If possible please share your configuration screenshot under the Module tab of the cc. Both processing seq. and Module config.

Former Member
0 Kudos

Please find the processing sequence under the module tab.

Thanks & Regards,

Naresh. K