0

I am using data loader CLI for upserting users. I have a config.properties with following content:

sfdc.endpoint=https://pqr.salesforce.com 
sfdc.username=yyy@xxx.com 
sfdc.password=xxxxx

When I execute the process from process-conf.xml, I get following error:

ERROR [userUpsert] config.Config decryptProperty (Config.java:704) - Error loading parameter: sfdc.password of type: java.lang.String javax.crypto.BadPaddingException: Given final block not properly padded

Unable to run process userUpsert java.lang.RuntimeException: com.salesforce.dataloader.exception.ControllerInitializationException: Error loading config file: C:\Users\sohan_shirodkar\Desktop\HR_Feed_Automation\config.properties. Please make sure that it exists and is readable

Everything works perfectly fine when I keep properties file empty and hardcode those parameters in xml file. Please note that when I am initializing the parameters in properties file, I am deleting their entries from xml file. I hope this is correct.

I have also verified my encrypted password by decrypting it.

0

The trick here is to initialize process.encryptionKeyFile value in the properties file itself along with the password. What I feel from this is that both the keys process.encryptionKeyFile and sfdc.password need to be initialized at the same location i.e. either within the xml file or within the properties file.

I also had to escape all the backslashes(\) in the file path as follows:

process.encryptionKeyFile=C:\\Users\\sohan_shirodkar\\Desktop\\HR_Feed_Automation\key.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.