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.

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

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"

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.

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”.

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:
|
<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:
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. |
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?
Do you have a JDBC driver for MS Access?
where to save process-conf.xml.
In same folder where you have config.properties file
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..
I am also getting same error….path not found…..oops!
Can you check that config files in proper directory ?
maybe change all the pathes like:
//computername/c$/path…..
worked for me with the Data Loader Batch downloaded in May 2015 from salesforce.com
Am I correct in assuming the v27.0.1 (and possibly other versions) require that the config.properties files doe snot contain path names?
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.
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.
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.
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.
Hi sourabh, is it everytime or occasionally?
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 !
Can you confirm your Path ?
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.
it 5000k queries or records ?
5000k queries
Wow.. I am not sure what is your business justification. But you can use ANT to iterate 5000k times to your Dataloader command and execute one after another, However be ready that it may take days to execute depending on your data. You can refer this article to know how to use ANT with dataloader : https://www.jitendrazaa.com/blog/salesforce/automate-command-line-dataloader-using-ant-with-dynamic-arguments-and-query/
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” />
Thats right, kinda this. ANT is very powerful and you can plug bits and pieces of ANT and dataloader together to achieve your solution.
Thank You.
Ricardo
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>
Hi Chris,
Format of XML file “process-conf.xml” is not correct or is not expected. Please check if this XML is in correct format.
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?
Can you check path for key file is correct with folder + file name. There may be multiple of reasons of this.
Hi Jitendra
I have the same issue i have correct proper XMl format i give correct path but the same issue happen please provide any solution
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
You can take help of ANT tasks. Use Dataloader from ANT and you can use various ANT tasks like send email. This article may give you heads up on using Dataloader and ANT together, https://www.jitendrazaa.com/blog/salesforce/using-dataloader-and-ant-to-backup-salesforce-data-on-ftp-server-video/
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
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.
Did you find a solution to this problem?
Did you find a solution to this problem?
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
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 ?
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 .
Yes its possible, Solution available here – https://www.jitendrazaa.com/blog/salesforce/using-dataloader-and-ant-to-backup-salesforce-data-on-ftp-server-video/
Can we run data loader on Linux server?
I didn’t tried, but should run because its java app
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?
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?
@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?
Hey Merul, can you post URL of CLIq ? Have not heard about it and thanks for letting me know
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 ?
It needs to be in “config.properties”. check line 9-10 in this post.
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
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.
Hi Gaurav,
I would suggest to delete all files from folder and create fresh key file, fresh config, it should fix your issue
Thanks Jitendra, it did help in resolving the issue. Though this is a strange way.
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.
Can you help with a Data Loader problem?
Excellent Article,
was able to troubleshoot my issue thanks to your sound advise
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!
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?
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
last parameter needs to be string and not path. can you confirm ?
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?
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)
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>
Hi Jitendra, is there a way to specify a parameter for folder name where the file will be created?
e.g. {$FolderPath}\Account.csv
How can I pass a folder path?
Thanks
Tried the above, apparently i got a message that I need the Salesforce token as well
ERROR [sf_existing_orgs] client.PartnerClient runOperation (PartnerClient.java:332) – Error while calling web service operation: login, error was:
[LoginFault [ApiFault exceptionCode=’LOGIN_MUST_USE_SECURITY_TOKEN’
Hello Andy,
I’m getting the same error !! did you find a solution ?
Hi Jitendra,
Thanks for such an elaborative posts. However, i am facing a situation now. I am trying to upsert data and have everything setup but when i ran the file, i am getting an error called “Attribute value “EventReg__c” of type ID must be unique within the document. when it said document, i assume the file that has my records, so for this i only have three records which have all unique value, i am not getting where i went wrong, can you please help.
Thanks,
Raj
Hi Jitendra,
I allowed the above steps and everything went smooth except for one issue the object into which i am trying to insert data there is only one required field on the layout and i gave that but yet it is still throwing an error saying one required field missing. I went back on salesforce end and checked why it is blocking, there is a ‘Name’ Auto Number required field, but since it is auto number we do not have to explicitly specify it right it should automatically append when it inserts the record right. I did the same through data loader applications and it successfully passed through, but with cmd it is not can anyone help with this.
Thanks.
You have to give the name of the field in you .sdl field and do the insert. Try that and let me know if it worked, when inserting, though you are not really should have the Id field and fields like Name, you should have them in your .sdl.
Hi Jitendra,
I am using version 44 and I am getting error saying Unsupported Option : -g when I am running encrypt.bat -g mysecretkey. I don’t know where am I going wrong.
Hi Ayush,
Can you give more specifics on this issue! are you trying to generate a key or trying to encrypt a password, what are you exactly tring. Also did you see if the native dataloader application is loading fine when you tried to open it? Please let me know
Thanks,
Raj
Hi Raj, I couldn’t go that further. I got this error right in the step 1 where I was trying to generate an encryption key using -g handle. And in the next step I would be able to encrypt my password using key.txt file.
Regards,
Ayush
Did you go to the path specific where your dataloader encrypt.bat file exists?
“C:\Program Files (x86)\salesforce.com\Data Loader\bin” .. You should be on this this path and then you have to enter the command.
Also did you see if the encrypt.bat file has the required script in it, sometime the .bat file will be empty and you wont be able to generate the key. Right click the .bat file and see if the script exists, if you see the file blank, then uninstall and re-install dataloader
Hi Raj,
Batch file is also good. It somehow worked when I copied the folder in c:/ and removed the space from the name. Also, changed the path and folder name everywhere in the script.
Thanks for the support.
Regards,
Ayush
Hi Raj, Ayush,
I am facing the same problem with encrypt.bat -g mykey. Everything looks fine from the configuration end. I have also tried Ayush’s resolution but it didn’t help me. Could you please help me out?
Yes his guide is outdated. -g is no longer supported
Is there any alternative available?
I am getting Error: Could not find or load main class com.salesforce.dataloader.security.EncryptionUtil
I tried c:\..\dataloader\v47.0.0\bin>encrypt -g secretKey with v47 and v50.
soql=”SELECT CreatedById,CreatedDate,et4ae5__CampaignMemberId__c,et4ae5__Clicked__c,et4ae5__Contact_ID__c,et4ae5__Contact__c,Name,OwnerId,Sent_in_Last_365_Days__c,SystemModstamp FROM et4ae5__IndividualEmailResult__c WHERE et4ae5__DateSent__c = LAST_N_MONTHS:4 AND et4ae5__DateSent__c < LAST_N_MONTHS:3 "
userName="${sf.prod.profileName.username}"
password="${sf.prod.profileName.password}"
serverURL="${sf.serverurl}"
batchSize="200"
The < symbal is not supported. Anyone know how to use < in build.xml file? I tried escape string & lt; however not helpful
double quote before Select statement does not work, the quotes should be similar to like the others in the query
Hello,
I am working with data loader v47.
dataloader\v47.0.0\bin>encrypt -g testing
Error: Could not find or load main class com.salesforce.dataloader.security.EncryptionUtil
and getting exception in first step only.
Could you please help me?
@shrradhaa Check line 9 of your encrypt.bat. You should see a path after -cp. Does that file exist?