You need to sign in to do that
Don't have an account?
zoobazz
Apex Data Loader 14.0 via Command Line
I've been having a big issue getting the Apex data loader to run via the command line. I'm using v14.
I've encrypted the password correctly:
The results I store in the conf file, which looks like this:
If I leave the sfdc.password entry in the xml it complains it's an invalid string. If I comment it out to just use the password file, I get:
Does v14.0 even work via the command line?
Thanks in advance.
I've encrypted the password correctly:
Code:
encrypt -e passwordSecurityToken
The results I store in the conf file, which looks like this:
Code:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="csvLenderExtractProcess" class="com.salesforce.lexiloader.process.ProcessRunner" singleton="false"> <description>csvLenderExtract job gets account info from salesforce and saves info into a CSV file."</description> <property name="name" value="csvLenderExtract"/> <property name="configOverrideMap"> <map> <entry key="sfdc.debugMessages" value="false"/> <entry key="sfdc.debugMessagesFile" value="c:\Program Files\salesforce.com\Apex Data Loader 14.0\sfdcSoapTrace.log"/> <entry key="sfdc.endpoint" value="https://www.salesforce.com"/> <entry key="sfdc.username" value="user@customer.com"/> <!-- password specified below is invalid, please generate one using the encrypt.bat utility --> <entry key="sfdc.password" value="a58afc521f2f0f6a1f26adab1e6dbc740d705a086f9301310754ec6f9753d7d0" /> <entry key="process.encryptionKeyFile" value="c:\Program Files\salesforce.com\Apex Data Loader 14.0\conf\password.key" /> <entry key="sfdc.timeoutSecs" value="600"/> <entry key="sfdc.loadBatchSize" value="200"/> <entry key="sfdc.entity" value="Account"/> <entry key="sfdc.extractionRequestSize" value="500"/> <entry key="sfdc.extractionSOQL" value="Select Id, Name FROM Account"/> <entry key="process.operation" value="extract"/> <entry key="process.mappingFile" value="C:\Program Files\salesforce.com\Apex Data Loader 14.0\conf\accountExtractMap.sdl"/> <entry key="dataAccess.type" value="csvWrite"/> <entry key="dataAccess.name" value="C:\Program Files\salesforce.com\Apex Data Loader 14.0\data\extractLender.csv"/> </map> </property> </bean> </beans>
If I leave the sfdc.password entry in the xml it complains it's an invalid string. If I comment it out to just use the password file, I get:
Code:
1232 [csvLenderExtract] ERROR com.salesforce.lexiloader.process.ProcessRunner - Invalid username, password, security token; or user locked out. Exception in thread "main" java.lang.RuntimeException: [LoginFault [ApiFault ex ceptionCode='INVALID_LOGIN' exceptionMessage='Invalid username, password, security token; or user locked ou t.' ] ] at com.salesforce.lexiloader.process.ProcessRunner.run(ProcessRunner.jav a:148) at com.salesforce.lexiloader.process.ProcessRunner.main(ProcessRunner.ja va:228) Caused by: [LoginFault [ApiFault exceptionCode='INVALID_LOGIN' exceptionMessage='Invalid username, password, security token; or user locked ou t.' ] ] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct orAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC onstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:563) at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:475) at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.jav a:187) at com.sforce.ws.transport.SoapConnection.createException(SoapConnection .java:166) at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:11 2) at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92) at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.jav a:864) at com.salesforce.lexiloader.client.PartnerClient.connectImpl(PartnerCli ent.java:169) at com.salesforce.lexiloader.client.PartnerClient.connect(PartnerClient. java:148) at com.salesforce.lexiloader.controller.Controller.login(Controller.java :174) at com.salesforce.lexiloader.process.ProcessRunner.run(ProcessRunner.jav a:115) ... 1 more
Thanks in advance.
http://www.apexdevnet.com/media/Cheatsheet_Setting_Up_Automated_Data_Loader_9_0.pdf
The interactive help and documentation doesn't go into this much detail. I used this guide and it works like a charm now. The encrypt -g and encrypt -e parameters are fully explained.
A definite must read.
The reference is certainly good but would benefit from a couple of key clarification points (some of which are pretty clear if you've used the API interfaces but may not be clear to newbies [like me]). Here're some things I learned that are important and not explicitly stated.
1) As with all Force.com API interactions (at least in v14), you'll need to use your security token. Therefore, when you are encrypting your 'password' for use in the process beans, you'll need to encrypt <password> + <securitytoken>. This manifests itself as a much longer string than what is depicted in this guide
2) When running the encrypt.bat with the -e directive, be sure to use the fully qualified path to the file (not the parent directory of that file). I've seen a lot of posts about bad padding exceptions and received the error myself before I realized I wasn't following the instructions correctly
3) This guide doesn't do much to explain how the .sdl (mapping) files are used in order to prepare your csv extracts. I assume these are critical for ETL type mapping so there should be some mention of these in this guide.
All-in-all, this wasn't too painful...
DataLoader works well. I'm sure you've already figured out the solution but if you like, try a couple of things. Command line or no, understand that the endpoint of the service very much matters. if you are in a sandbox env, you'll need to use test.salesforce.com as the domain. if in prod, www.salesforce.com. if in prerelease, use that domain (I think it's something like prerel....salesforce.com)
Hello,
This is an old thread but thought I'd post a problem I'm having trying to do this. Here's my process-conf.xml file:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="csvExtractProcess" class="com.salesforce.lexiloader.process.ProcessRunner" singleton="false" lazy-init="default" autowire="default" dependency-check="default">
<description>csvLDRStatusLeadHistory job gets LDR Status Lead History report and saves into a CSV file."</description>
<property name="name" value="csvExtractProcess" />
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="false" />
<entry key="sfdc.endpoint" value="https://www.salesforce.com" />
<entry key="sfdc.username" value="name@company.com" />
<!--<entry key="sfdc.password" value="d26be910d2788210b7599a0fa482650de9829a74d3e7107b83fd692aaae1eced0f14087d48636fc2" />-->
<entry key="process.encryptionKeyFile" value="C:\Users\Administrator\Desktop\key.txt" />
<entry key="sfdc.timeoutSecs" value="600" />
<entry key="sfdc.loadBatchSize" value="200" />
<entry key="sfdc.entity" value="LeadHistory" />
<entry key="sfdc.extractionRequestSize" value="500" />
<entry key="sfdc.extractionSOQL" value="Select LeadId, Lead.FirstName, Lead.LastName, Lead.OwnerId, Lead.CreatedById, Field, OldValue, NewValue, Lead.Id, FROM LeadHistory WHERE Field = 'LDR_Status__c'" />
<entry key="process.operation" value="extract" />
<entry key="dataAccess.type" value="csvWrite" />
<entry key="dataAccess.writeUTF8" value="true"/>
<entry key="dataAccess.name" value="C:\Program Files (x86)\salesforce.com\Apex Data Loader 23.0\reports\csvLDRStatus.csv" />
<entry key="process.statusOutputDirectory" value="C:\Program Files (x86)\salesforce.com\Apex Data Loader 23.0\reports" />
</map>
</property>
</bean>
</beans>
I'm following the process outlined above. when trying to run from the command line, getting errors like this:
"Error registering bean with name 'csvExtractProcess' defined in file [C:\Program Files (x86)\salesforce.com\Apex Data Loader 23.0\process-conf.xml]: Bean class [com.salesforce.lexiloader.process.ProcessRunner] not found; nested exception is java.lang.ClassNotFoundException: com.salesforce.lexiloader.process.ProcessRunner"
Any ideas?
Thanks in advance.
Guyver118 are you able to resolve this issue??
Please let me know if you are as i am also facing the same problem.
thanks
Nidhi