• Arpit Agarwal
  • 0 Points
  • Member since 2014

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1
We have a CLI Data loader batch which runs to export the records from salesforce.
I wanted to encrypt the new password & use the encrypted password to login to Salesforce through CLI.
After I had encrypted the password & saved the password in process.conf file, it fails to login to Salesforce with the error "Given last block not properly padded" once run the batch.
To resolve the above issue, I had to save the key.txt file.
Also, I had to add one more line in the xml to put the reference in the process.conf xml file.
After I had followed the above pocess, it worked perfiectly fine.
But ,my question is previously we never added that line in the xml, but was working.
Can anyone please let me know the root cause of this issue?


I seem to be having an issue with the Encrypt or decrypt portion of the password process. From what i read on the return from command prompt, it knows the first two characters in my password and decrypts it properly ("Sh") but it seems to have a problem with something after this point??? Or i could be completely crazy...


Might anyone be able to shed some light? Did i encrypt wrong? Is it recquired to have a key file? If so, where am i supposed to place it?


Any help would be appreciated.

834 [main] FATAL com.salesforce.dataloader.process.ProcessRunner  - Unable to ru
n process UofUAccountExtractToCSV
java.lang.RuntimeException: com.salesforce.dataloader.exception.ParameterLoadExc
eption: Error loading parameter: sfdc.password of type: java.lang.String
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
Caused by: com.salesforce.dataloader.exception.ParameterLoadException: Error loa
ding parameter: sfdc.password of type: java.lang.String
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6
        at com.salesforce.dataloader.config.Config.postLoad(Config.java:620)
        at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
        ... 2 more
Caused by: java.lang.NumberFormatException: For input string: "Sh"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.
        at java.lang.Integer.parseInt(Integer.java:447)
        at java.lang.Integer.valueOf(Integer.java:526)
        at java.lang.Integer.decode(Integer.java:919)
        at com.salesforce.dataloader.security.EncryptionUtil.textToBytes(Encrypt
        at com.salesforce.dataloader.security.EncryptionUtil.decryptString(Encry
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6

 process-conf.xml looks like this:


<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

    <bean id="UofUAccountExtractToCSV"
      <description>Gets the UofU accounts with clients and exports to CSV"</description>
        <property name="name" value="UofUAccountExtractToCSV"/>
        <property name="configOverrideMap">
                <entry key="sfdc.debugMessages" value="false"/>
                <entry key="sfdc.debugMessagesFile" value="c:\Salesforce\DataLoader\Resources\Logs\SFDCdebug.log"/>
                <entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
                <entry key="sfdc.username" value="sfdcusername"/>
		<entry key="sfdc.password" value="value returned by encrypt.bat -e"/>
                <entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.entity" value="Client__c"/>
                <entry key="sfdc.extractionSOQL" value="SELECT c.LIS_Account_Name__c, c.Entity_Code__c,c.ClientID_Ext_Id__c, c.Phone_and_Extension__c, c.Secured_Fax__c, c.Comments__c,c.Street_Address__c, c.City__c, c.State__c, c.account__r.name from client__c c where c.account__r.recordtypeid ='012C0000000Q7lIIAS'"/>
                <entry key="process.operation" value="extract"/>
                <entry key="process.mappingFile" value="c:\Salesforce\DataLoader\Resources\Mapping\UofUAccountExtractMap.sdl"/>
                <entry key="process.outputError" value="c:\Salesforce\DataLoader\Resources\Logs\LastOperationError.csv"/>
    		<entry key="dataAccess.writeUTF8" value="true"/>            
		<entry key="dataAccess.type" value="csvWrite"/>
                <entry key="dataAccess.name" value="c:\Salesforce\DataLoader\Resources\Data\UofUSFDCExtract.csv"/>