• Ankur201
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I'd like to develop a batch file that can export data using the Data Loader command line. I'm starting with a simple process-conf.xml file:

 

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="account"
class="com.salesforce.lexiloader.process.ProcessRunner"
singleton="false">
<description></description>
<property name="name" value="csvAccount"/>
<property name="configOverrideMap">
<map>
<entry key="sfdc.endpoint" value="https://www.salesforce.com"/>
<entry key="sfdc.username" value="my_user_name"/>
<entry key="sfdc.password" value="my_80-char_password_string"/>

<entry key="sfdc.debugMessages" value="false"/>
<entry key="sfdc.debugMessagesFile" value="C:\Export.log" />
<entry key="sfdc.timeoutSecs" value="120"/>
<entry key="sfdc.loadBatchSize" value="200"/>

<entry key="process.operation" value="extract"/>
<entry key="dataAccess.type" value="csvWrite" />
<entry key="dataAccess.writeBatchSize" value="1" />
<entry key="sfdc.extractionRequestSize" value="1" />
<entry key="process.enableExtractSuccessOutput" value="true" />

<entry key="process.outputError" value="C:\ERRORaccount.csv" />

<entry key="dataAccess.name" value="C:\account.csv" />
<entry key="sfdc.entity" value="account"/>
<entry key="sfdc.extractionSOQL" value="select id, phone from account" />
</map>
</property>
</bean>
</beans>

 

When I run this from the command line, I get a bunch of DEBUG and INFO output, followed by:

 

2704 [account] INFO com.salesforce.lexiloader.dao.DataAccessObjectFactory - Instantiating data access object: C:\account.csv of type: csvWrite
2704 [account] INFO com.salesforce.lexiloader.process.ProcessRunner - Checkingthe data access object connection
2704 [account] INFO com.salesforce.lexiloader.process.ProcessRunner - Setting field types
3500 [account] INFO com.salesforce.lexiloader.process.ProcessRunner - Setting object reference types
Exception in thread "main" java.lang.NullPointerException
at com.salesforce.lexiloader.client.PartnerClient.setFieldReferenceDescribes(PartnerClient.java:462)
at com.salesforce.lexiloader.controller.Controller.setReferenceDescribes(Controller.java:140)
at com.salesforce.lexiloader.process.ProcessRunner.run(ProcessRunner.java:129)
at com.salesforce.lexiloader.process.ProcessRunner.main(ProcessRunner.java:228)

 

 It's logging in (if I change the username, I get a different error), and it creates the account.csv file, but it's empty.

 

If I change the sfdc.entity property to "xxx," I get an error indicating that no such SObject exists.

 

If I change the sfdc.extractionSOQL property to select from "xxx" instead of from "account," I get the same null pointer exception.

 

I'm logging in as a System Administrator, so I doubt there's a permission problem.

 

Any ideas?

 

Thanks,

 

MJ.

 

 

 

  • September 04, 2009
  • Like
  • 0