[SalesForce] “Cannot parse empty string” error when exporting using dataloader

I'm trying to run Data Loader from the command line and export all the fields for the contact object. We're using a third party app which has modified this standard object. I've defined a mapping file containing all the fields that are exported when you use the Data Loader tool itself. When I run it I get this error:

<?xml version="1.0" encoding="UTF-8"?><env:Envelope
   xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <env:Header>
  <CallOptions xmlns="urn:partner.soap.sforce.com">
   <client>DataLoaderPartnerBatch/36.0</client>
   <defaultNamespace xsi:nil="true" />
   <returnFieldDataTypes>false</returnFieldDataTypes>
  </CallOptions>
  <SessionHeader xmlns="urn:partner.soap.sforce.com">
   <sessionId>00D58000000Y0QB!ARIAQGhDjJnFwJK2qMmzmmvZxcopWdufXRDvTyEBFbs5W0icnBY6uR.Piy7YgTZclqb68jGOpIlVkPQ6uUGwQduc4__L1T7r</sessionId>
  </SessionHeader>
 </env:Header>
 <env:Body>
  <m:describeSObject xmlns:m="urn:partner.soap.sforce.com" xmlns:sobj="urn:sobject.partner.soap.sforce.com">
   <m:sObjectType>causeview__Volunteer_Role__c</m:sObjectType>
  </m:describeSObject>
 </env:Body>
</env:Envelope>

2016-06-23 17:04:16,771 INFO  [contactExportProcess] process.ProcessRunner run (ProcessRunner.java:145) - Creating Map
2016-06-23 17:04:16,781 INFO  [contactExportProcess] action.OperationInfo instantiateAction (OperationInfo.java:95) - Instantiating action for operation: extract
2016-06-23 17:04:16,786 INFO  [contactExportProcess] controller.Controller executeAction (Controller.java:120) - executing operation: extract
2016-06-23 17:04:16,789 INFO  [contactExportProcess] action.AbstractAction execute (AbstractAction.java:120) - Loading: extract
2016-06-23 17:04:16,798 ERROR [contactExportProcess] action.AbstractAction handleException (AbstractAction.java:204) - Exception occured during loading
2016-06-23 14:29:22,978 ERROR [contactExportProcess] action.AbstractAction handleException (AbstractAction.java:204) - Exception occured during loading java.lang.IllegalArgumentException: Cannot parse empty string

Above that snippet of XML are similar ones where the m:SObjectType is Account and User. The third party app is called Causeview, causeview__Volunteer_Role__c is a custom object. What could be causing this problem?

Best Answer

The example given in the data loader guide for an upsert doesn't include fields that you need for an extract. Here are the missing fields:

<entry key="sfdc.extractionRequestSize" value="200"/>
                <entry key="sfdc.extractionSOQL" value="select ID,
OWNERID,
ISDELETED,
NAME,
CREATEDDATE,
CREATEDBYID,
etc.
from contact"/>

The error was caused because there was no SOQL, hence an empty string error.

Related Topic