Command line dataloader in Salesforce – Solve Common errors

How to use Command line dataloader in Salesforce with troubleshooting steps and answers to common errors

I had this article in my list for long time and today i got chance to share with you all. Data Loader is great native tool provide by the Salesforce to insert, upsert, update, export and delete data. Standard Data Loader wizard needs interaction however there are many scenarios where we need to perform these data loading tasks repeatedly like every night 1:00 AM (Nightly Services) or something. So, for these situations we can use standard data loader tool from Command line.

In this article, i will explain in detail on how to use Data Loader from command line.

The most important part of setting up Command line Data loader is to generate the encrypted password using utility provided by the Data Loader.

Commandline Data Loader tools
Commandline Data Loader tools

This directory contains two utility batch file : “encrypt.bat” and “process.bat”

Navigate to “Program Files | Data Loader | bin” in command prompt and run command.

encrypt.bat –g YOURSECRETKEY
Generate Secret Key for Command Line Dataloader
Generate Secret Key for Command Line Dataloader

The secrete key provided can be anything of your choice. Copy the generated Text highlighted in White color and paste in new file “Key.txt“.

Now run again above command to generated encrypted password with following command:

encrypt.bat -e password "C:Users\shiva\Desktop\Data Loader Documents\Try\Key.txt"
Commandline Data Loader generate Encrypted Password
Commandline Data Loader generate Encrypted Password

Now, note this password somewhere, as it is going to be used in remaining part of configuration.

Make sure that password generated is correct by checking below command, it will say password Matched or not :

encrypt.bat -v generatedPassword actualPassword secretKeyFilePath

If you are using proxy server and it uses the password, then repeat same step for generating encrypted password.

Salesforce command line dataloader - verify encrypted text
Salesforce command line dataloader – verify encrypted password

Additionaly, if we type only encrypt.bat without any parameter, it will show all the available options with help text.

Create file – “config.properties”:

This file contains all the common configurations settings like UserName, encrypted password. This file can also be kept as blank however it is good practice to write all common configurations in this file. Keys in this file will be same as of “Process-config.xml” as described at the end of this article.

Example:

#Loader Config
#Wed Sep 19 2012
sfdc.debugMessages=true
process.encryptionKeyFile=C:\Users\shiva\Desktop\Data Loader Documents\Try\Key.txt
sfdc.debugMessagesFile = C:\Users\shiva\Desktop\Data Loader Documents\Try\AccountExport.log
sfdc.endpoint=https://login.salesforce.com
sfdc.username=ilovenagpur@gmail.com
sfdc.password=7b5693f0cad856dc778d4b8506f2c976
sfdc.proxyUsername=proxyUserName
sfdc.proxyPassword=encrypytesPassword
sfdc.proxyHost=proxyhostName
sfdc.proxyPort=123
sfdc.loadBatchSize=200
sfdc.timeoutSecs=600

Create file – “process-conf.xml” :

This file contains all the information regarding import or export. In this article I am exporting the Account data, so sample file is

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="Account"
	class="com.salesforce.dataloader.process.ProcessRunner"
	singleton="false">
		<description>Export Account Data</description>
		<property name="name" value="Account"/>
		<property name="configOverrideMap">
		<map>
			<entry key="sfdc.enableLastRunOutput" value="false"/>
			<entry key="sfdc.entity" value="Account"/>
			<entry key="process.operation" value="extract"/>
			<entry key="sfdc.extractionRequestSize" value="500"/>
			<entry key="sfdc.extractionSOQL" value="SELECT Id FROM Account"/>
			<entry key="dataAccess.name" value="D:\Data Load\Seed Data\Jit\Production - 16 Aug 12AccountExport.csv"/>
			<entry key="dataAccess.type" value="csvWrite"/>
			<entry key="dataAccess.writeUTF8" value="true" />
		</map>
		</property>
	</bean>
</beans>

At the end of this article, you can see the description of all parameters. Assuming that we are inside the bin folder of dataloader then run below Command:

Process.bat "directory path where we have file process-config.xml"  process Name

In our case the process name is Account, process name is nothing but the property “name”.

Run Commandline Data Loader
Run Commandline Data Loader

After running the above command your data will be exported in file provided in configuration “process-config.xml” file.

While working with command line dataloader, there are chances that you get few error. So i am also inclusing few common error and there solutions:

Error 1:
Dataloader error: “javax.crypto.BadPaddingException:”Or error loading parameter of sfdc.password
Solution :
Add “process.encryptionKeyFile=C:\Users\315447\Desktop\Data Loader\key.txt” Either in “config.properties” or “process-conf.xml”

<entry key="process.encryptionKeyFile" value="config/key.txt"/>

Error 2:
Error in query: query is empty
Solution:
Occurs, If “sfdc.extractionSOQL” key in beans node does not have valid SOQL.

Parameters for Process-config.xml:

Parameter
Description
<bean id=" PROCESSNAME " class="com.salesforce.lexiloader.process.ProcessRunner" singleton="false"> This first line uniquely defines the process in the XML file. This has to be unique and will be used to call the process later on. Only change the PROCESSNAME and leave all other parts the same.
<description> Your Description here </description>A description of the process.
<property name="name" value="PROCESSNAME "/>Copy the PROCESSNAME and place it in this parameter. This is used in the log files when debug messages are showing. This is the name that is shown on the debug logs.
<property name="configOverrideMap"> These two lines initiate the parameters for the process. They should not be changed and should always be the same.
<entry key="sfdc.debugMessages" value="false"/>Set this to True if you want detailed debug messages to appear in the command line.
<entry key="sfdc.debugMessagesFile" value="c:\\dataloader\\samples\\status\\accountMasterSoapTrace.log"/>Set the value to a directory and a file to keep the detailed log file in.
WARNING: This can create an extremely large file. Make sure that you have space on your hard drive before this is set.
<entry key="sfdc.endpoint" value="https://www.salesforce.com"/>Keep default, unless loading into Sandbox. for sandbox, it is test.salesforce.com.
<entry key="sfdc.username" value="jitendrazaa@winter13Sand.com" />Set this as the username of the user you are importing /exporting as.
<entry key="sfdc.password" value="b6b3016135f717754590a3e35b1db32b" /><br/> <entry key="process.encryptonKeyFile" value="C:\\Program Files\\salesforce.com\\Apex Data Loader 9.0\\test\\Key.txt" />See this article on how to create Encrypted password for Command line Dataloader in Salesforce
<entry key="sfdc.timeoutSecs" value="600"/>System time out value.
<entry key="sfdc.loadBatchSize" value="200"/>System batch load size.
<entry key="process.operation" value="extract" />Signifies the process being run.
Possible Values:
  • Extract
  • Insert
  • Delete
  • Upsert
<entry key="sfdc.entity" value="Account"/>Signifies the object that you are running this process for. This should be the API name of the object when you are running processes for custom objects.
<entry key="sfdc.extractionRequestSize" value="500"/>Batch size for extract processes only
This is the SOQL query run for extract processes. You can use the Data Loader GUI to generate the SOQL statement and conditions and simply cut and paste into this entry key.
<entry key="dataAccess.type" value="csvWrite" />Signifies the action when doing the process for Extract, Insert, Delete, Upsert. This key should be used in conjunction with the "process.operation" key.
Possible Values:
  1. csvRead
  2. csvWrite
  3. databaseRead
  4. databaseWrite

When using Extract processes, use csvWrite. When using Delete, Insert, and Upsert processes, use csvRead.
<entry key="dataAccess.writeUTF8" value="true" />When using a "csvWrite" dataccess type, set this to True when you want files to be extracted as UTF-8.
<entry key="dataAccess.name" value="<b>C:\\Program Files\\salesforce.com\\Apex Data Loader 9.0\\test\\extract.csv</b>" />Signifies the location and file name of the dataaccess type process. If running a csvRead, the process will look for the file in this location. If running a csvWrite, the process will replace the file in this location.
<entry key="process.mappingFile" value="<b>C:\\Program Files\\salesforce.com\\Apex Data Loader 9.0\\test\\upsert_mapping.sdl</b>"/>Signifies the location of a data loader mapping file. This is the same mapping file used when saving a mapping from the data loader GUI. This is required for insert, delete and upsert processes.
<entry key="sfdc.externalIdField" value="Customer_ID__c"/>Signifies the External ID field used for the upsert process. This is required for upserts.
<entry key="process.statusOutputDirectory" value="C:\\Program Files\\salesforce.com\\Apex Data Loader 9.0\\test\\logs\\" />Signifies the directory where the data loader success and error files will be created in.
<entry key="process.outputSuccess" value="C:\\Program Files\\salesforce.com\\Apex Data Loader 9.0\\test\\Logs\\csvUpsertProcess_success.csv" /><br/><br/> <entry key="process.outputError" value="C:\\Program Files\\salesforce.com\\Apex Data Loader 9.0\\test\\Logs\\csvUpsertProcess_error.csv" />Signifies the directory and filename where the success and error files will be created. If this key is not specified, the "process.statusOutputDirectory" key will contain similar filenames as ones generated by the data loader GUI.

Related posts

59 thoughts on “Command line dataloader in Salesforce – Solve Common errors”

  1. Hi, I am trying to connect to a MS Access DB using dataloader, but having difficulties with it. Do you have a database-conf.xml file which has the proper setting for an MS Access connection?

  2. Hai,,,when am running Process.bat file ,,,,i am getting this error ,,please help to solve this problem…it is taking process-conf.xml file 2 times in path when am running and showing File not found error…

    c:Program Filessalesforce.comApex Data Loader 23.0bin>process.bat “C:program filessalesforce.comApex Dataloader 23.0testconfigprocess-conf.xml” accountinsert

    0 [main] INFO com.salesforce.dataloader.process.ProcessConfig – Loading process configuration from config file: C:program filessalesforce.comApex Dataloader 23.0testconfigprocess-conf.xmlprocess-conf.xml

    34 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader – Loading XML bean definitions from file [C:program filessalesforce.comApex Dataloader 23.0testconfigprocess-conf.xmlprocess-conf.xml]

    36 [main] ERROR com.salesforce.dataloader.process.ProcessConfig – Error loading process: accountinsert configuration from config file: C:program filessalesforce.comApex Dataloader 23.0testconfigprocess-conf.xmlprocess-conf.xml

    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:program filessalesforce.comApex Dataloader 23.0testconfigprocess-conf.xmlprocess-conf.xml]; nested exception is java.io.FileNotFoundException: C:program filessalesforce.comApex Dat

    aloader 23.0testconfigprocess-conf.xmlprocess-conf.xml (The system cannot find the path specified)

    java.io.FileNotFoundException: C:program filessalesforce.comApex Dataloader 23.0testconfigprocess-conf.xmlprocess-conf.xml (The system cannot find the path specified)

    at java.io.FileInputStream.open(Native Method)

    at java.io.FileInputStream.(FileInputStream.java:106)

    at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:85)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:167)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)

    at org.springframework.beans.factory.xml.XmlBeanFactory.(XmlBeanFactory.java:68)

    at org.springframework.beans.factory.xml.XmlBeanFactory.(XmlBeanFactory.java:56)

    at com.salesforce.dataloader.process.ProcessConfig.getBeanFactory(ProcessConfig.java:79)

    at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(ProcessConfig.java:68)

    at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRunner.java:260)

    at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRunner.java:246)

    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:219)

    41 [main] FATAL com.salesforce.dataloader.process.ProcessRunner – Failed to create process

    com.salesforce.dataloader.exception.ProcessInitializationException: Error loading process: accountinsert configuration from config file: C:program filessalesforce.comApex Dataloader 23.0testconfigprocess-conf.xmlprocess-conf.xml

    at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(ProcessConfig.java:72)

    at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRunner.java:260)

    at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRunner.java:246)

    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:219)

    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:program filessalesforce.comApex Dataloader 23.0testconfigprocess-conf.xmlprocess-conf.xml]; nested exception is java.io.FileNotFoundException: C:program filessalesforce.c

    omApex Dataloader 23.0testconfigprocess-conf.xmlprocess-conf.xml (The system cannot find the path specified)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:180)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)

    at org.springframework.beans.factory.xml.XmlBeanFactory.(XmlBeanFactory.java:68)

    at org.springframework.beans.factory.xml.XmlBeanFactory.(XmlBeanFactory.java:56)

    at com.salesforce.dataloader.process.ProcessConfig.getBeanFactory(ProcessConfig.java:79)

    at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(ProcessConfig.java:68)

    … 3 more

    Caused by: java.io.FileNotFoundException: C:program filessalesforce.comApex Dataloader 23.0testconfigprocess-conf.xmlprocess-conf.xml (The system cannot find the path specified)

    at java.io.FileInputStream.open(Native Method)

    at java.io.FileInputStream.(FileInputStream.java:106)

    at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:85)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:167)

    … 8 more

    Thanks in Advance..

    1. maybe change all the pathes like:
      //computername/c$/path…..

      worked for me with the Data Loader Batch downloaded in May 2015 from salesforce.com

  3. Am I correct in assuming the v27.0.1 (and possibly other versions) require that the config.properties files doe snot contain path names?

  4. Hi Jitendra , need to know how to insertupsert detail object records using parent object external id , using command line data loader . I tried doing that and getting error :

    Field name provided, Ext_id__c does not match an External ID for childobject__c

    I’m a little confused why the error suggests the external Id is on the “Childobject” object.

  5. Hi Jitendra,

    I was facing Error 1: Dataloader error: “javax.crypto.BadPaddingException when trying to run the batch through Data loader CLI.

    The resolution mentioned by you worked and now it is running fine after adding “process.encryptionKeyFile” reference in my process-config.xml file.

    But earlier I do not had to add that reference in my XML file and it used to work just fine so i want to know that why do I had to add it this time around. Please let me know the root cause of this issue.
    It is very important for me and any help on this would be appreciated.

    1. Hi Arpit,
      Not sure how it worked previously, it happened to me also. I also started getting this error and once i resolved it, this article was updated. I am glad it helped you. I guess may be because of Dataloader jar file update.

  6. Hi,

    2015-03-02 05:58:23,138 INFO [databaseAccountExtract] progress.NihilistProgressAdapter setSubTask (NihilistProgressAdapter.java:73) – Processed 500 of
    6,859 total records. Rate: 3,000 records per hour. Estimated time to complete: 101 minutes and 51 seconds. There are 500 successes and 0 errors.
    2015-03-02 05:58:23,154 ERROR [databaseAccountExtract] action.AbstractAction handleException (AbstractAction.java:198) – Exception occured during loadi
    ng
    com.salesforce.dataloader.exception.ExtractException: java.net.SocketException: Connection reset

    only 500 records are coming successfully after that socket timeout exception.

  7. Hi,

    “Error loading parameter: sfdc.password of type: java.lang.String”

    I don’t understand, i have copied the whole config.properties.

    I have tested my encrypted passwords with encrypt.bat -v generatedPassword secretKey

    I must say that if i don’t use config.properties but only process-conf.xml with the goods parameters It works…

    Any help would be appreciated.

    Thanks !

  8. Hello everybody!

    @JitendraZaa:disqus, how can I create a .bat file to run 5000k select queries in dataloder cliq?

    I have a list (excel) with the 5000k queries but now I need to create a process to run this 5000 queries at once.

    Can you please help me?

    Thank You very much in advance,

    Ricardo.

          1. Thank you.

            Yes, I know that it will take a long time, bur it is only a sample (100 rows for each 5000 fields).

            Is it something like this?:

            target name=”all”>

            96 ”

            100 userName=”${sf.prod.profileName.username}”

            101 password=”${sf.prod.profileName.password}”

            102 serverURL=”${sfProd.serverurl}”

            103 batchSize=”200″

            104 limit = “1000” />

  9. Hi Jitendra, thanks for the detail approach, why am executing final step “process.bat” am getting error.

    C:Desktopsalesforce.comData Loaderbin>process.bat “C:Usersk

    bogavelDesktopData Loader Documents” Account

    2015-06-19 12:16:22,023 INFO [main] controller.Controller initLog (Controller.j

    ava:389) – Using built-in logging configuration, no log-conf.xml in C:Userskbo

    gavelDesktopsalesforce.comData Loaderbinlog-conf.xml

    2015-06-19 12:16:22,028 INFO [main] controller.Controller initLog (Controller.j

    ava:391) – The log has been initialized

    2015-06-19 12:16:22,033 INFO [main] process.ProcessConfig getBeanFactory (Proce

    ssConfig.java:103) – Loading process configuration from config file: C:Userskb

    ogavelDesktopData Loader Documentsprocess-conf.xml

    2015-06-19 12:16:22,098 INFO [main] support.AbstractApplicationContext prepareR

    efresh (AbstractApplicationContext.java:495) – Refreshing org.springframework.co

    ntext.support.FileSystemXmlApplicationContext@cd5f8b: startup date [Fri Jun 19 1

    2:16:22 EDT 2015]; root of context hierarchy

    2015-06-19 12:16:22,136 INFO [main] xml.XmlBeanDefinitionReader loadBeanDefinit

    ions (XmlBeanDefinitionReader.java:315) – Loading XML bean definitions from URL

    [file://C:/Desktop/Data Loader Documents/process-conf.xml]

    2015-06-19 12:16:31,806 ERROR [main] process.ProcessConfig getProcessInstance (P

    rocessConfig.java:96) – Error loading process: Account configuration from config

    file: C:DesktopData Loader Documentsprocess-conf.xml

    org.springframework.beans.factory.BeanDefinitionStoreException: IOException pars

    ing XML document from URL [file://C:/Desktop/Data Loader Document

    s/process-conf.xml]; nested exception is java.net.UnknownHostException: C

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

    nDefinitions(XmlBeanDefinitionReader.java:341)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

    nDefinitions(XmlBeanDefinitionReader.java:302)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

    r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

    r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

    r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

    r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)

    at org.springframework.context.support.AbstractXmlApplicationContext.loa

    dBeanDefinitions(AbstractXmlApplicationContext.java:127)

    at org.springframework.context.support.AbstractXmlApplicationContext.loa

    dBeanDefinitions(AbstractXmlApplicationContext.java:93)

    at org.springframework.context.support.AbstractRefreshableApplicationCon

    text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)

    at org.springframework.context.support.AbstractApplicationContext.obtain

    FreshBeanFactory(AbstractApplicationContext.java:522)

    at org.springframework.context.support.AbstractApplicationContext.refres

    h(AbstractApplicationContext.java:436)

    at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:140)

    at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:84)

    at com.salesforce.dataloader.process.ProcessConfig.getBeanFactory(Proces

    sConfig.java:105)

    at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(Pr

    ocessConfig.java:93)

    at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRu

    nner.java:287)

    at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRu

    nner.java:273)

    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja

    va:246)

    Caused by: java.net.UnknownHostException: C

    at java.net.PlainSocketImpl.connect(Unknown Source)

    at java.net.SocksSocketImpl.connect(Unknown Source)

    at java.net.Socket.connect(Unknown Source)

    at java.net.Socket.connect(Unknown Source)

    at sun.net.NetworkClient.doConnect(Unknown Source)

    at sun.net.NetworkClient.openServer(Unknown Source)

    at sun.net.ftp.FtpClient.openServer(Unknown Source)

    at sun.net.ftp.FtpClient.openServer(Unknown Source)

    at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)

    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Sour

    ce)

    at org.springframework.core.io.UrlResource.getInputStream(UrlResource.ja

    va:125)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

    nDefinitions(XmlBeanDefinitionReader.java:328)

    … 17 more

    2015-06-19 12:16:31,810 FATAL [main] process.ProcessRunner topLevelError (Proces

    sRunner.java:238) – Failed to create process

    com.salesforce.dataloader.exception.ProcessInitializationException: Error loadin

    g process: Account configuration from config file: C:DesktopDat

    a Loader Documentsprocess-conf.xml

    at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(Pr

    ocessConfig.java:97)

    at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRu

    nner.java:287)

    at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRu

    nner.java:273)

    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja

    va:246)

    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOExc

    eption parsing XML document from URL [file://C:/Desktop/Data Load

    er Documents/process-conf.xml]; nested exception is java.net.UnknownHostExceptio

    n: C

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

    nDefinitions(XmlBeanDefinitionReader.java:341)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

    nDefinitions(XmlBeanDefinitionReader.java:302)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

    r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

    r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

    r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

    r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)

    at org.springframework.context.support.AbstractXmlApplicationContext.loa

    dBeanDefinitions(AbstractXmlApplicationContext.java:127)

    at org.springframework.context.support.AbstractXmlApplicationContext.loa

    dBeanDefinitions(AbstractXmlApplicationContext.java:93)

    at org.springframework.context.support.AbstractRefreshableApplicationCon

    text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)

    at org.springframework.context.support.AbstractApplicationContext.obtain

    FreshBeanFactory(AbstractApplicationContext.java:522)

    at org.springframework.context.support.AbstractApplicationContext.refres

    h(AbstractApplicationContext.java:436)

    at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:140)

    at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:84)

    at com.salesforce.dataloader.process.ProcessConfig.getBeanFactory(Proces

    sConfig.java:105)

    at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(Pr

    ocessConfig.java:93)

    … 3 more

    Caused by: java.net.UnknownHostException: C

    at java.net.PlainSocketImpl.connect(Unknown Source)

    at java.net.SocksSocketImpl.connect(Unknown Source)

    at java.net.Socket.connect(Unknown Source)

    at java.net.Socket.connect(Unknown Source)

    at sun.net.NetworkClient.doConnect(Unknown Source)

    at sun.net.NetworkClient.openServer(Unknown Source)

    at sun.net.ftp.FtpClient.openServer(Unknown Source)

    at sun.net.ftp.FtpClient.openServer(Unknown Source)

    at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)

    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Sour

    ce)

    at org.springframework.core.io.UrlResource.getInputStream(UrlResource.ja

    va:125)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

    nDefinitions(XmlBeanDefinitionReader.java:328)

    … 17 more

    C:Desktopsalesforce.comData Loaderbin>

      1. hi Jitendra,

        i too have the same issue running in my system. i tried with the proper XML format but still it is throwing the same exception. Is there any work around for that?

  10. Hi All,
    I have a question, How do you get to know that process is complete?
    I have scheduled a bat file to insert various sObject’s data daily but how do i know that process is complete

  11. Hi All,

    I am getting following error while executing

    C:Program Files (x86)salesforce.comData Loaderbin>encrypt.bat -v c95b705b441a10edf25aee16fafb5fd1 test

    2015-08-20 06:07:46,567 ERROR [main] security.EncryptionUtil main (EncryptionUtil.java:336) – Error decrypting string: c95b705b441

    a10edf25aee16fafb5fd1, error: Given final block not properly padded.

    Thanks,

    Jacky

    1. Above command seems you try to check if generated password is correct with secret key “test”, Can you check your key file has any space or something. If you follow all steps it should work. Also, make sure there are no unused files in directory, sometimes it conflicts.

  12. Hi All,

    I configured as specified in this article, but I’m getting this error in log file:

    2015-09-08 13:18:20,128 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) – Failed to create process

    com.salesforce.dataloader.exception.ProcessInitializationException: Error loading process: csvAccountExtractProcess configuration from config file: C:UsersspadminsvilDesktopDataLoaderprocess-conf.xml

  13. Hi All ,
    Can i use the Data Loader command line, if i have those files available on the shared netwrok ? for the upload on the salesforce ?

  14. Let me Explain the whole scenario :
    One of the Application is generating two files and those files are saved on the shared netwrok of the client, prior it was a manual process using data loader we were able to upload the records on the salesforce but now we want to automate the whole process can i use the Data Loader CLI to automate it. is it going to fetch those files from the shared netwrok ? if yes how it will gonna work ? Please explain . Thanks .

  15. When encrypting the password, is it just your password alone, or is it the combination of password/security key that Data Loader requires when using the GUI?

  16. Hi Jitendra,
    I wanted to send an email to certain ppl with the failed record count in automated command line data loader process? Will it be possible to do it using Ant?

  17. @JitendraZaa:disqus: Just to add, CLIq will be the great add on to above process and it make the process UI friendly.
    Can you highlight some cases which cannot be done by CLIq because of which we need to come to basic config of CLI?

  18. Hi Jitendra ,

    Where do we add the proxy password. Is it in the same key file as the sfdc password or is there a separate file which we need to create ?

  19. I am There on this Step when using the DAta Laoder CLI bt what is the Next Steps?
    Please Guide me/
    encrypt.bat -v generatedPassword secretKey

  20. Hi Jitendra,

    thank you for sharing this excellent article which greatly helped me in building a data integrations for one of my clients. However when the password has been reset for the salesforce account that I was using to sign in, I am unable to encrypt it properly again. I am getting an error while checking the encrypted string stating “Given final block not properly padded”.

    I have followed all the steps given here almost 10 times now. I can share the details if required.

    Could you please help?

    Thank you.

      1. HI Jitendra

        As suggested, I followed the same steps, but still facing the same issue. Could you please help me in its resolution since I have a very close go-live date.
        Resolution steps I tried:
        1. Creating New Folder and New File for Key file.
        2. Uninstalling and re-installing Data Loader.

        Waiting in anticipation.

  21. Hi Jitendra, very helpful article.

    I would like to create a process to extract data from a custom object and I would like to schedule this to run 1st of every month. I would basically like to extract last year’s last months data. For example, if the job runs on July 1st, 2017, I want to extract records that were created in June, 2016. Could you please help me with the SOQL for this? Thank you!

    1. Hi Chandra,

      Were you able to achieve this by anyways, if you did, please can you share the approach you have taken to get his run automatically. Also, were you saving the extracts somewhere on SFTP?

  22. Hi Jitendra,
    I am using CLI for data loader version 40. When i am giving encrypt.bat -g key.txt it is giving me an error that “The system path is not specified.” Can you please guide me what could be the possible reason for the same. I have checked my java and it is installed correctly and working fine.

    Thanks in advance.
    Pankaj

  23. Hi Jitendra,
    Can you tell me if I can give and SFTP location to save the extracted file under process-conf.xml file?
    Also, does task scheduler help to run these batch jobs nightly. is it possible?

  24. I’m getting commandline proxy authentication issue: Please help me resolve the issue

    2018-03-09 11:24:46,499 WARN [csvAccountExtract] auth.HttpAuthenticator generateAuthResponse (HttpAuthenticator.java:207) – NEGOTIATE authentication error: No valid credentials provided (Mechanism level: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt))
    2018-03-09 11:24:46,500 WARN [csvAccountExtract] auth.HttpAuthenticator generateAuthResponse (HttpAuthenticator.java:207) – KERBEROS authentication error: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
    2018-03-09 11:24:46,501 WARN [csvAccountExtract] auth.HttpAuthenticator generateAuthResponse (HttpAuthenticator.java:207) – NTLM authentication error: Credentials cannot be used for NTLM authentication: org.apache.http.auth.UsernamePasswordCredentials
    2018-03-09 11:24:46,588 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) – Unable to run process csvAccountExtract
    java.lang.RuntimeException: java.lang.RuntimeException: 407 Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
    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: java.lang.RuntimeException: 407 Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
    at com.salesforce.dataloader.client.HttpClientTransport.getContent(HttpClientTransport.java:138)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:97)
    at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.java:818)
    at com.salesforce.dataloader.client.PartnerClient$8.run(PartnerClient.java:161)
    at com.salesforce.dataloader.client.PartnerClient$8.run(PartnerClient.java:152)
    at com.salesforce.dataloader.client.PartnerClient.runOperation(PartnerClient.java:328)
    at com.salesforce.dataloader.client.PartnerClient.loginInternal(PartnerClient.java:524)
    at com.salesforce.dataloader.client.PartnerClient.login(PartnerClient.java:492)
    at com.salesforce.dataloader.client.PartnerClient.connect(PartnerClient.java:213)
    at com.salesforce.dataloader.controller.Controller.login(Controller.java:173)
    at com.salesforce.dataloader.controller.Controller.login(Controller.java:168)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:128)

  25. Hi am getting the result below after I run the process.bat command – seems like I have everything I need in place, just not sure why my csv extract does not show up where its supposed to:

    Usage: java [-options] class [args…]
    (to execute a class)
    or java [-options] -jar jarfile [args…]
    (to execute a jar file)
    where options include:
    -d32 use a 32-bit data model if available
    -d64 use a 64-bit data model if available
    -client to select the “client” VM
    -server to select the “server” VM
    The default VM is client.

    -cp
    -classpath
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D=
    set a system property
    -verbose:[class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:
    Warning: this feature is deprecated and will be removed
    in a future release.
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
    Warning: this feature is deprecated and will be removed
    in a future release.
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:…|:]
    -enableassertions[:…|:]
    enable assertions with specified granularity
    -da[:…|:]
    -disableassertions[:…|:]
    disable assertions with specified granularity
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:[=]
    load native agent library , e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:[=]
    load native agent library by full pathname
    -javaagent:[=]
    load Java programming language agent, see java.lang.instrument
    -splash:
    show splash screen with specified image
    See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
    C:\Users\ma5113\Desktop\Data Loader Local\bin>

Leave a Reply