1

I'm looking for set an automated time-based batch with Data Loader.. So, i've followed these steps:

https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/command_line_intro.htm

i've copyed the edited process-conf.xml in: "C:\Program Files (x86)\salesforce.com\Data Loader\bin"

Started the process in cmd (admin privileges) with the command: process.bat C:\Program Files (x86)\salesforce.com\Data Loader\bin testPROCESS

but i get this error: process-conf.xml not found in C:\Program\

so i moved that file in: "C:\Program\"

Started the process in cmd (admin privileges) with the command: process.bat C:\Program testPROCESS

and get these errors:


2017-12-01 12:32:14,671 ERROR [testPROCESS] config.Config decryptProperty (Config.java:704) - 
Error loading parameter: sfdc.password of type: java.lang.Stringjavax.crypto.BadPaddingException: 
Given final block not properly padded
        at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:991)
        at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:847)
        at com.sun.crypto.provider.DESCipher.engineDoFinal(DESCipher.java:314)
        at javax.crypto.Cipher.doFinal(Cipher.java:2165)
        at com.salesforce.dataloader.security.EncryptionUtil.decryptString(EncryptionUtil.java:210)
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:698)
        at com.salesforce.dataloader.config.Config.postLoad(Config.java:655)
        at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config.java:678)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:120)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
2017-12-01 12:32:14,671 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) - 
Unable to run process AFFLEGinsertjava.lang.RuntimeException: 
com.salesforce.dataloader.exception.ParameterLoadException: 
Error loading parameter: sfdc.password of type: java.lang.String
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:162)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)

Caused by: com.salesforce.dataloader.exception.ParameterLoadException: Error loading parameter: 
sfdc.password of type: java.lang.String
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:705)
        at com.salesforce.dataloader.config.Config.postLoad(Config.java:655)
        at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config.java:678)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:120)
        ... 2 more

Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
        at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:991)
        at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:847)
        at com.sun.crypto.provider.DESCipher.engineDoFinal(DESCipher.java:314)
        at javax.crypto.Cipher.doFinal(Cipher.java:2165)
        at com.salesforce.dataloader.security.EncryptionUtil.decryptString(EncryptionUtil.java:210)
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:698)
        ... 5 more 

1 Answer 1

1

The data loader requires an encrypted password for security reasons.

When running Data Loader in batch mode from the command line, you must encrypt the following configuration parameters:

  • sfdc.password
  • sfdc.proxyPassword

Data Loader offers an encryption utility to secure passwords specified in configuration files. This utility is used to encrypt passwords, but data that you transmit using Data Loader is not encrypted.

Run \bin\encrypt.bat. At the command line, follow the prompts provided to execute the following actions:

Generate a key

Key text is generated on screen from the text you provide. Carefully copy the key text to a key file, omitting any leading or trailing spaces. The key file can then be used for encryption and decryption.

Encrypt text

Generates an encrypted version of a password or other text. Optionally, you can provide a key file for the encryption. In the configuration file, make sure that the encrypted text is copied precisely and the key file is mentioned.

Verify encrypted text

Given encrypted and decrypted versions of a password, verifies whether the encrypted password provided matches its decrypted version. A success or failure message is printed to the command line.

Also, your original command line failed because you forgot the quotes:

 process.bat "C:\Program Files (x86)\salesforce.com\Data Loader\bin" testPROCESS
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .