+ Start a Discussion
JR1204JR1204 

Data Loader using command line password error

Hi Folks,

 

I'm trying to run an insert using Data loader with command line interface. Below is my command:

 

C:\Program Files\salesforce.com\Data Loader\bin>process.bat "C:\Program Files\Salesforce.com" accountInsert

 

 

 

Vinita_SFDCVinita_SFDC

Hello,

 

Please confirm the location of the files process-conf.xml,log-conf.xml and key.txt suppose it is in the folder with the name test folder then the command will be like:

 

C:\Program Files\salesforce.com\Data Loader\bin>process.bat "C:\Program Files\Salesforce.com\Data Loader\test" accountInsert

JR1204JR1204

Hi Vinita,

 

I set up the test folder and ran the same command you have below. I received an error listed below. The way I created the password is this: I used (my salesforce sandbox password + security token) and encrypted the entire string. Is this correct? Any other tips you can offer?

 

2013-08-27 08:15:45,922 INFO [main] controller.Controller initLog (Controller.java:389) - Using built-in logging configuration, no log-conf.xml in C:\Program Files\salesforce.com\Data Loader\bin\log-conf.xml
2013-08-27 08:15:45,929 INFO [main] controller.Controller initLog (Controller.java:391) - The log has been initialized
2013-08-27 08:15:45,934 INFO [main] process.ProcessConfig getBeanFactory (ProcessConfig.java:103) - Loading process configuration from config file: C:\Program files\salesforce.com\data loader\test\process-conf.xml
2013-08-27 08:15:46,056 INFO [main] xml.XmlBeanDefinitionReader loadBeanDefinitions (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from file [C:\Program files\salesforce.com\data loader\test\process-conf.xml]
2013-08-27 08:15:46,130 INFO [accountInsert] controller.Controller initConfig (Controller.java:327) - config dir created at C:\Program files\salesforce.com\data loader\test
2013-08-27 08:15:46,141 INFO [accountInsert] controller.Controller initConfig (Controller.java:355) - The controller config has been initialized
2013-08-27 08:15:46,142 INFO [accountInsert] process.ProcessRunner run (ProcessRunner.java:116) - Initializing process engine
2013-08-27 08:15:46,142 INFO [accountInsert] process.ProcessRunner run (ProcessRunner.java:119) - Loading parameters
2013-08-27 08:15:46,817 ERROR [accountInsert] config.Config decryptProperty (Config.java:692) - Error loading parameter: sfdc.password of type: java.lang.String
javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA13*..)
at javax.crypto.Cipher.doFinal(DashoA13*..)
at com.salesforce.dataloader.security.EncryptionUtil.decryptString(EncryptionUtil.java:210)
at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:686)
at com.salesforce.dataloader.config.Config.postLoad(Config.java:638)
at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config.java:664)
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)
2013-08-27 08:15:46,819 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) - Unable to run process accountInsert
java.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:693)
at com.salesforce.dataloader.config.Config.postLoad(Config.java:638)
at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config.java:664)
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.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA13*..)
at javax.crypto.Cipher.doFinal(DashoA13*..)
at com.salesforce.dataloader.security.EncryptionUtil.decryptString(EncryptionUtil.java:210)
at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:686)
... 5 more

Vinita_SFDCVinita_SFDC

Hi,

 

Seems there has been some error while encryption, please check the page 21 of the link: https://ap1.salesforce.com/help/doc/en/salesforce_data_loader.pdf and encrypt password.

 

Also you can refer: http://abztech.wordpress.com/2011/05/24/encrypting-salesforce-password/

JitendraJitendra
For all the users coming back, You will receive this error if path to key file is missing in "process-conf.xml". 
<entry key="process.encryptionKeyFile" value="path/key.txt"/>

For more, refer this blog article - http://www.jitendrazaa.com/blog/salesforce/tutorial-of-command-line-dataloader-salesforce/