• SFDave_126
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 9
    Replies
I'm encountering a number of issues while attempting to pull files directly into Salesforce Apex using OneDrive REST API where I get max size limit error messages and other abnormalities such as additional whitespacing if the Request Header is set to 'application/json' instead of 'application/octet-stream' or other mimeTypes that OneDrive uses for describing the file metadatamax size limit error
.twb file example with whitespace when using 'application/json' as Request Header
Whitespace issue goes away when using 'application/octet-stream' instead which is what MS Graph mimeType is set to
I'm trying to pull a file object-type from O365 via the Graph API and I'm getting back a return-type that is pretty atypical to the normal JSON return format I'd expect to see. I'm not sure if it's an issue on the Microsoft or Salesforce side. I can't seem to pull any additional information or attributes about the object type itself other than the filename but I do need to change it from an HTTPResponse object to an Apex string before I can do any additional parsing in Salesforce. I can show the snippets of the Apex code I have so far if that would help explain things better.
I'm working on parsing JSON output using the classes generated by the JSON2Apex code generators hosted on Heroku and GitHub.io and I'm running into an issue where the outputs from both generators are either not working correctly or they're missing pieces that are preventing it from fully working in Apex v43. I'm not sure if it'd be best to start posting raw code or explain the issue a bit more in detail. I got it partially working, but I had to "blend" the output from both solutions to get part of it working and I wasn't sure if anyone else is encountering something similar.
So I'm in a dilemma. Right now, I'm using the ANT Migraton tool to pull all of the SOQL object query fields that I would normally get via the DataLoader WebUI, however it's not pulling all the query fields in the XML output because specific keywords. This presents a problem because when I go to parse that output into the process-conf.xml file, I'm getting incomplete data or in some instances, no data at all. In running a comparison between the fields I'm parsing vs the fields in the Data Loader WebUI, it comes down to a handful of specific query fields that I'm either missing or that are pulled from the ANT Migration Tool but don't show up in Data Loader. I did uncover another method here, but it's hard to follow the syntax because I'm guessing you're getting right into pure Apache ANT at this point. I can post what I have so far if anyone wants to take a look.
How can I pull a list of all of the available query fields for an SOQL object? I have my DataLoader script ready to go, but I need a way to pull all the query fields for specific SOQL data objects and feed them into my process-conf.xml file in DataLoader to pull the values of all those fields to a separate location. I have the DataLoader value pulling already setup, but I need a way to get all the available query fields as they continue to change. The ANT Migration Tool does not appear to be able to pull the query fields itself.
According to this SF YouTube video, a specific Salesforce permission is required to integrate Salesforce with Sharepoint Online via the Files Connect app. From reading the available documentation on Files Connect, I'm not seeing the mentioned setting in the Files Connect implementation guide: https://resources.docs.salesforce.com/212/latest/en-us/sfdc/pdf/salesforce_files_connect_implementation.pdf

Where can I find it?
I'm trying to retrieve metadata about two Standard Objects and for some reason, I'm not getting any output from the ANT Migration Tool to troubleshoot. I have the following files defined:

build.xml
<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce">

    <property file="build.properties"/>
    <property environment="env"/>

    <!-- Setting default value for username, password and session id properties to empty string 
         so unset values are treated as empty. Without this, ant expressions such as ${sf.username}
         will be treated literally.
    -->
    <condition property="sf.username" value=""> <not> <isset property="sf.username"/> </not> </condition>
    <condition property="sf.password" value=""> <not> <isset property="sf.password"/> </not> </condition>
    <condition property="sf.sessionId" value=""> <not> <isset property="sf.sessionId"/> </not> </condition>

    <taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce">
        <classpath>
            <pathelement location="ant-salesforce.jar" />        	
        </classpath>
    </taskdef>
	
    <!-- See what happens here -->
    <target name="retrieveSOQL">
      <sf:retrieve 
          username="${sf.username}" 
          password="${sf.password}" 
          sessionId="${sf.sessionId}"
          serverurl="${sf.serverurl}" 
          retrieveTarget="../output" 
          unpackaged="package.xml"/>
    </target>
</project>

package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Account</members>
        <members>Opportunity</members>
        <name>CustomObject</name>
    </types>
    <version>41.0</version>
</Package>
When I run 'ant -p retrieveSOQL', I get the following output with no information in my '..\output' directory:
 
Buildfile: C:\Users\test_user\Desktop\AntProjectFolder\salesforce\build.xml

Main targets:

Other targets:

 retrieveSOQL
Default target: test
I have the correct username/password specified in my 'build.properties' file so I know that's not the issue. Any ideas?

 
I'm sure I might be missing something but I'm trying to enable or confirm whether the Ant Migration Tool is enabled in my Connected Apps. In the "Lightning Experience", if I go to setup, Manage Apps under Administration Setup, I see the Ant Migration Tool listed with no 'Start URL' defined, but under Setup, App Setup, Apps, I don't see it listed anywhere. The Force.com REST API Developer Guide doesn't explicitly state what to do in this situation, but I wanted to know if based on my settings whether the Ant Migration Tool is already setup for Oauth2.
Is there any way to query all the fields in a Salesforce data object via Ant or the META API? I see plenty of solutions that perform queries via the Apex Developer Console, but I'm looking for a command-line way to achieve this in Ant or META if possible.
I'm continuing to receive errors in all of my SOQL tables that end with a '__c' suffix. here are a few examples of what I'm referring to:
Select Id, OwnerId, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, LastViewedDate, LastReferencedDate FROM Employees__c 

Select Id, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM Allocation__c
The error messages I receive are the same for both tables:
2018-03-08 10:58:34,200 INFO  [main] controller.Controller initLog (Controller.java:396) - Using built-in logging configuration, no log-conf.xml in C:\Program Files (x86)\salesforce.com\Data Loader\bin\log-conf.xml
2018-03-08 10:58:34,216 INFO  [main] controller.Controller initLog (Controller.java:398) - The log has been initialized
2018-03-08 10:58:34,231 INFO  [main] process.ProcessConfig getBeanFactory (ProcessConfig.java:104) - Loading process configuration from config file: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml
2018-03-08 10:58:34,356 INFO  [main] support.AbstractApplicationContext prepareRefresh (AbstractApplicationContext.java:495) - Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@1a8dfcc: startup date [Thu Mar 08 10:58:34 EST 2018]; root of context hierarchy
2018-03-08 10:58:34,513 INFO  [main] xml.XmlBeanDefinitionReader loadBeanDefinitions (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from file [C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml]
2018-03-08 10:58:35,638 INFO  [main] support.DefaultListableBeanFactory preInstantiateSingletons (DefaultListableBeanFactory.java:557) - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@15435c: defining beans [csvAccountExtractProcess,csvOpportunityExtractProcess,csvContactExtractProcess,csvLeadExtractProcess,csvRevenueExtractProcess,csvTaskExtractProcess,csvEventExtractProcess,csvProjectExtractProcess,csvGrantsProjectExtractProcess,csvResearcherExtractProcess,csvEmployeesExtractProcess,csvAllocationExtractProcess]; root of factory hierarchy
2018-03-08 10:58:35,716 INFO  [csvEmployeesExtract] controller.Controller initConfig (Controller.java:334) - config dir created at C:\Program Files (x86)\salesforce.com\Data Loader\conf
2018-03-08 10:58:35,747 INFO  [csvEmployeesExtract] controller.Controller initConfig (Controller.java:362) - The controller config has been initialized
2018-03-08 10:58:35,747 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:116) - Initializing process engine
2018-03-08 10:58:35,747 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:119) - Loading parameters
2018-03-08 10:58:36,216 INFO  [csvEmployeesExtract] config.LastRun load (LastRun.java:96) - Last run info will be saved in file: C:\Program Files (x86)\salesforce.com\Data Loader\conf\csvEmployeesExtract_lastRun.properties
2018-03-08 10:58:36,263 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:127) - Logging in to: https://na1.salesforce.com
2018-03-08 10:58:36,544 INFO  [csvEmployeesExtract] client.PartnerClient login (PartnerClient.java:479) - Beginning Partner Salesforce login ....
2018-03-08 10:58:36,606 INFO  [csvEmployeesExtract] client.PartnerClient loginInternal (PartnerClient.java:523) - Salesforce login to https://na1.salesforce.com/services/Soap/u/41.0 as user test_account@somecompany.com
2018-03-08 10:58:37,481 INFO  [csvEmployeesExtract] dao.DataAccessObjectFactory getDaoInstance (DataAccessObjectFactory.java:51) - Instantiating data access object: C:\Users\test_user\Desktop\salesforce_backup\sf_employees.csv of type: csvWrite
2018-03-08 10:58:37,481 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:132) - Checking the data access object connection
2018-03-08 10:58:37,497 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:137) - Setting field types
2018-03-08 10:58:37,841 ERROR [csvEmployeesExtract] client.PartnerClient runOperation (PartnerClient.java:332) - Error while calling web service operation: describeSObject, error was:
[InvalidSObjectFault [ApiQueryFault [ApiFault  exceptionCode='INVALID_TYPE'
 exceptionMessage='sObject type 'Employees' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.'
 extendedErrorDetails='{[0]}'
]
 row='-1'
 column='-1'
]
]

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:673)
        at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
        at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:236)
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:210)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:156)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
        at com.sforce.soap.partner.PartnerConnection.describeSObject(PartnerConnection.java:1422)
        at com.salesforce.dataloader.client.PartnerClient$10.run(PartnerClient.java:185)
        at com.salesforce.dataloader.client.PartnerClient$10.run(PartnerClient.java:177)
        at com.salesforce.dataloader.client.PartnerClient.runOperation(PartnerClient.java:328)
        at com.salesforce.dataloader.client.PartnerClient.describeSObject(PartnerClient.java:726)
        at com.salesforce.dataloader.client.PartnerClient.setFieldTypes(PartnerClient.java:679)
        at com.salesforce.dataloader.controller.Controller.setFieldTypes(Controller.java:130)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:138)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
2018-03-08 10:58:37,856 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) - Unable to run process csvEmployeesExtract
java.lang.RuntimeException: sObject type 'Employees' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:160)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
Caused by: [InvalidSObjectFault [ApiQueryFault [ApiFault  exceptionCode='INVALID_TYPE'
 exceptionMessage='sObject type 'Employees' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.'
 extendedErrorDetails='{[0]}'
]
 row='-1'
 column='-1'
]
]

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:673)
        at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
        at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:236)
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:210)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:156)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
        at com.sforce.soap.partner.PartnerConnection.describeSObject(PartnerConnection.java:1422)
        at com.salesforce.dataloader.client.PartnerClient$10.run(PartnerClient.java:185)
        at com.salesforce.dataloader.client.PartnerClient$10.run(PartnerClient.java:177)
        at com.salesforce.dataloader.client.PartnerClient.runOperation(PartnerClient.java:328)
        at com.salesforce.dataloader.client.PartnerClient.describeSObject(PartnerClient.java:726)
        at com.salesforce.dataloader.client.PartnerClient.setFieldTypes(PartnerClient.java:679)
        at com.salesforce.dataloader.controller.Controller.setFieldTypes(Controller.java:130)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:138)
        ... 2 more
The output doesn't provide a clear picture of where the error message is, however it does point to some invalid tables. Below is a redacted example of my process-conf.xml file for the Allocation bean:
<bean id="csvAllocationExtractProcess"
          class="com.salesforce.dataloader.process.ProcessRunner"
          singleton="false">
      <description>csvAllocationExtract job."</description>
        <property name="name" value="csvAllocationExtract"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.debugMessages" value="false"/>
                <entry key="sfdc.debugMessagesFile" value="C:\Users\test_user\Desktop\salesforce_backup\sfdcSoapTrace.log"/>
                <entry key="sfdc.endpoint" value="https://na1.salesforce.com"/>
                <entry key="sfdc.username" value=test_account@somecompany.com"/>
                <entry key="sfdc.password" value="somepassword"/>
                <entry key="process.encryptionKeyFile" value="C:\Program Files (x86)\salesforce.com\Data Loader\akeyfile.txt"/>
                <entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.entity" value="Allocation"/>
                <entry key="sfdc.extractionRequestSize" value="500"/>
                <entry key="sfdc.extractionSOQL" value="Select Id, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM Allocation__c"/>
                <entry key="process.operation" value="extract"/>
                <entry key="dataAccess.type" value="csvWrite"/>
                <entry key="dataAccess.name" value="C:\Users\test_user\Desktop\salesforce_backup\sf_allocation.csv"/>
            </map>
        </property>
    </bean>
Any ideas where the issue is here? All of my other SOQL tables without the '__c' suffix work fine without issue.
 
How do I direct the Salesforce Data Loader program for Windows operating systems to back up multiple tables defined in a sample process-conf.xml file? I've tried multiple entry keys like the one below in one <bean> and multiple <bean> ID's with different names directed at each entry key to no avail:
<entry key="sfdc.extractionSOQL" value="





 
I'm trying to run the 'process.bat' executable in the Data Loader program for Windows and I get the following output:
 
C:\Program Files (x86)\salesforce.com\Data Loader\bin>process.bat "C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml"
2018-03-01 14:32:04,339 INFO  [main] controller.Controller initLog (Controller.java:396) - Using built-in logging configuration, no log-conf.xml in C:\Program Files (x86)\salesforce.com\Data Loader\bin\log-conf.xml
2018-03-01 14:32:04,354 INFO  [main] controller.Controller initLog (Controller.java:398) - The log has been initialized
2018-03-01 14:32:04,385 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) - Unable to run process null
java.lang.RuntimeException: com.salesforce.dataloader.exception.ControllerInitializationException: could not create configuration directory: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:112)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
Caused by: com.salesforce.dataloader.exception.ControllerInitializationException: could not create configuration directory: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml
        at com.salesforce.dataloader.controller.Controller.initConfig(Controller.java:332)
        at com.salesforce.dataloader.controller.Controller.<init>(Controller.java:110)
        at com.salesforce.dataloader.controller.Controller.getInstance(Controller.java:219)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:110)
        ... 2 more
C:\Program Files (x86)\salesforce.com\Data Loader\bin>process.bat "C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml" csvAccountExtractProcess
2018-03-01 14:32:15,182 INFO  [main] controller.Controller initLog (Controller.java:396) - Using built-in logging configuration, no log-conf.xml in C:\Program Files (x86)\salesforce.com\Data Loader\bin\log-conf.xml
2018-03-01 14:32:15,213 INFO  [main] controller.Controller initLog (Controller.java:398) - The log has been initialized
2018-03-01 14:32:15,213 INFO  [main] process.ProcessConfig getBeanFactory (ProcessConfig.java:104) - Loading process configuration from config file: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml
2018-03-01 14:32:15,338 INFO  [main] support.AbstractApplicationContext prepareRefresh (AbstractApplicationContext.java:495) - Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@1a8dfcc: startup date [Thu Mar 01 14:32:15 EST 2018]; root of context hierarchy
2018-03-01 14:32:15,401 INFO  [main] xml.XmlBeanDefinitionReader loadBeanDefinitions (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from file [C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml]
2018-03-01 14:32:15,417 ERROR [main] process.ProcessConfig getProcessInstance (ProcessConfig.java:96) - Error loading process: csvAccountExtractProcess configuration from config file: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml]; nested exception is java.io.FileNotFoundException: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml (The system cannot find the path specified)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:436)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84)
        at com.salesforce.dataloader.process.ProcessConfig.getBeanFactory(ProcessConfig.java:111)
        at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(ProcessConfig.java:93)
        at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRunner.java:287)
        at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRunner.java:273)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:246)
Caused by: java.io.FileNotFoundException: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml (The system cannot find the path specified)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:113)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
        ... 17 more
2018-03-01 14:32:15,417 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:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml
        at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(ProcessConfig.java:97)
        at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRunner.java:287)
        at com.salesforce.dataloader.process.ProcessRunner.getInstance(ProcessRunner.java:273)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:246)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml]; nested exception is java.io.FileNotFoundException: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml (The system cannot find the path specified)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:436)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84)
        at com.salesforce.dataloader.process.ProcessConfig.getBeanFactory(ProcessConfig.java:111)
        at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(ProcessConfig.java:93)
        ... 3 more
Caused by: java.io.FileNotFoundException: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml\process-conf.xml (The system cannot find the path specified)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:113)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
        ... 17 more

For some reason, the process.bat file is attempting to call the name of the config file twice and it's not able to create a configuration directory. I followed the five steps outlined here: https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/command_line_import_data.htm

Any idea what I'm missing or not doing?
I'm encountering a number of issues while attempting to pull files directly into Salesforce Apex using OneDrive REST API where I get max size limit error messages and other abnormalities such as additional whitespacing if the Request Header is set to 'application/json' instead of 'application/octet-stream' or other mimeTypes that OneDrive uses for describing the file metadatamax size limit error
.twb file example with whitespace when using 'application/json' as Request Header
Whitespace issue goes away when using 'application/octet-stream' instead which is what MS Graph mimeType is set to
So I'm in a dilemma. Right now, I'm using the ANT Migraton tool to pull all of the SOQL object query fields that I would normally get via the DataLoader WebUI, however it's not pulling all the query fields in the XML output because specific keywords. This presents a problem because when I go to parse that output into the process-conf.xml file, I'm getting incomplete data or in some instances, no data at all. In running a comparison between the fields I'm parsing vs the fields in the Data Loader WebUI, it comes down to a handful of specific query fields that I'm either missing or that are pulled from the ANT Migration Tool but don't show up in Data Loader. I did uncover another method here, but it's hard to follow the syntax because I'm guessing you're getting right into pure Apache ANT at this point. I can post what I have so far if anyone wants to take a look.
I'm trying to retrieve metadata about two Standard Objects and for some reason, I'm not getting any output from the ANT Migration Tool to troubleshoot. I have the following files defined:

build.xml
<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce">

    <property file="build.properties"/>
    <property environment="env"/>

    <!-- Setting default value for username, password and session id properties to empty string 
         so unset values are treated as empty. Without this, ant expressions such as ${sf.username}
         will be treated literally.
    -->
    <condition property="sf.username" value=""> <not> <isset property="sf.username"/> </not> </condition>
    <condition property="sf.password" value=""> <not> <isset property="sf.password"/> </not> </condition>
    <condition property="sf.sessionId" value=""> <not> <isset property="sf.sessionId"/> </not> </condition>

    <taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce">
        <classpath>
            <pathelement location="ant-salesforce.jar" />        	
        </classpath>
    </taskdef>
	
    <!-- See what happens here -->
    <target name="retrieveSOQL">
      <sf:retrieve 
          username="${sf.username}" 
          password="${sf.password}" 
          sessionId="${sf.sessionId}"
          serverurl="${sf.serverurl}" 
          retrieveTarget="../output" 
          unpackaged="package.xml"/>
    </target>
</project>

package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Account</members>
        <members>Opportunity</members>
        <name>CustomObject</name>
    </types>
    <version>41.0</version>
</Package>
When I run 'ant -p retrieveSOQL', I get the following output with no information in my '..\output' directory:
 
Buildfile: C:\Users\test_user\Desktop\AntProjectFolder\salesforce\build.xml

Main targets:

Other targets:

 retrieveSOQL
Default target: test
I have the correct username/password specified in my 'build.properties' file so I know that's not the issue. Any ideas?

 
I'm sure I might be missing something but I'm trying to enable or confirm whether the Ant Migration Tool is enabled in my Connected Apps. In the "Lightning Experience", if I go to setup, Manage Apps under Administration Setup, I see the Ant Migration Tool listed with no 'Start URL' defined, but under Setup, App Setup, Apps, I don't see it listed anywhere. The Force.com REST API Developer Guide doesn't explicitly state what to do in this situation, but I wanted to know if based on my settings whether the Ant Migration Tool is already setup for Oauth2.
Is there any way to query all the fields in a Salesforce data object via Ant or the META API? I see plenty of solutions that perform queries via the Apex Developer Console, but I'm looking for a command-line way to achieve this in Ant or META if possible.
I'm continuing to receive errors in all of my SOQL tables that end with a '__c' suffix. here are a few examples of what I'm referring to:
Select Id, OwnerId, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, LastViewedDate, LastReferencedDate FROM Employees__c 

Select Id, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM Allocation__c
The error messages I receive are the same for both tables:
2018-03-08 10:58:34,200 INFO  [main] controller.Controller initLog (Controller.java:396) - Using built-in logging configuration, no log-conf.xml in C:\Program Files (x86)\salesforce.com\Data Loader\bin\log-conf.xml
2018-03-08 10:58:34,216 INFO  [main] controller.Controller initLog (Controller.java:398) - The log has been initialized
2018-03-08 10:58:34,231 INFO  [main] process.ProcessConfig getBeanFactory (ProcessConfig.java:104) - Loading process configuration from config file: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml
2018-03-08 10:58:34,356 INFO  [main] support.AbstractApplicationContext prepareRefresh (AbstractApplicationContext.java:495) - Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@1a8dfcc: startup date [Thu Mar 08 10:58:34 EST 2018]; root of context hierarchy
2018-03-08 10:58:34,513 INFO  [main] xml.XmlBeanDefinitionReader loadBeanDefinitions (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from file [C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml]
2018-03-08 10:58:35,638 INFO  [main] support.DefaultListableBeanFactory preInstantiateSingletons (DefaultListableBeanFactory.java:557) - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@15435c: defining beans [csvAccountExtractProcess,csvOpportunityExtractProcess,csvContactExtractProcess,csvLeadExtractProcess,csvRevenueExtractProcess,csvTaskExtractProcess,csvEventExtractProcess,csvProjectExtractProcess,csvGrantsProjectExtractProcess,csvResearcherExtractProcess,csvEmployeesExtractProcess,csvAllocationExtractProcess]; root of factory hierarchy
2018-03-08 10:58:35,716 INFO  [csvEmployeesExtract] controller.Controller initConfig (Controller.java:334) - config dir created at C:\Program Files (x86)\salesforce.com\Data Loader\conf
2018-03-08 10:58:35,747 INFO  [csvEmployeesExtract] controller.Controller initConfig (Controller.java:362) - The controller config has been initialized
2018-03-08 10:58:35,747 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:116) - Initializing process engine
2018-03-08 10:58:35,747 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:119) - Loading parameters
2018-03-08 10:58:36,216 INFO  [csvEmployeesExtract] config.LastRun load (LastRun.java:96) - Last run info will be saved in file: C:\Program Files (x86)\salesforce.com\Data Loader\conf\csvEmployeesExtract_lastRun.properties
2018-03-08 10:58:36,263 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:127) - Logging in to: https://na1.salesforce.com
2018-03-08 10:58:36,544 INFO  [csvEmployeesExtract] client.PartnerClient login (PartnerClient.java:479) - Beginning Partner Salesforce login ....
2018-03-08 10:58:36,606 INFO  [csvEmployeesExtract] client.PartnerClient loginInternal (PartnerClient.java:523) - Salesforce login to https://na1.salesforce.com/services/Soap/u/41.0 as user test_account@somecompany.com
2018-03-08 10:58:37,481 INFO  [csvEmployeesExtract] dao.DataAccessObjectFactory getDaoInstance (DataAccessObjectFactory.java:51) - Instantiating data access object: C:\Users\test_user\Desktop\salesforce_backup\sf_employees.csv of type: csvWrite
2018-03-08 10:58:37,481 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:132) - Checking the data access object connection
2018-03-08 10:58:37,497 INFO  [csvEmployeesExtract] process.ProcessRunner run (ProcessRunner.java:137) - Setting field types
2018-03-08 10:58:37,841 ERROR [csvEmployeesExtract] client.PartnerClient runOperation (PartnerClient.java:332) - Error while calling web service operation: describeSObject, error was:
[InvalidSObjectFault [ApiQueryFault [ApiFault  exceptionCode='INVALID_TYPE'
 exceptionMessage='sObject type 'Employees' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.'
 extendedErrorDetails='{[0]}'
]
 row='-1'
 column='-1'
]
]

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:673)
        at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
        at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:236)
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:210)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:156)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
        at com.sforce.soap.partner.PartnerConnection.describeSObject(PartnerConnection.java:1422)
        at com.salesforce.dataloader.client.PartnerClient$10.run(PartnerClient.java:185)
        at com.salesforce.dataloader.client.PartnerClient$10.run(PartnerClient.java:177)
        at com.salesforce.dataloader.client.PartnerClient.runOperation(PartnerClient.java:328)
        at com.salesforce.dataloader.client.PartnerClient.describeSObject(PartnerClient.java:726)
        at com.salesforce.dataloader.client.PartnerClient.setFieldTypes(PartnerClient.java:679)
        at com.salesforce.dataloader.controller.Controller.setFieldTypes(Controller.java:130)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:138)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
2018-03-08 10:58:37,856 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) - Unable to run process csvEmployeesExtract
java.lang.RuntimeException: sObject type 'Employees' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:160)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
Caused by: [InvalidSObjectFault [ApiQueryFault [ApiFault  exceptionCode='INVALID_TYPE'
 exceptionMessage='sObject type 'Employees' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.'
 extendedErrorDetails='{[0]}'
]
 row='-1'
 column='-1'
]
]

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:673)
        at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
        at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:236)
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:210)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:156)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
        at com.sforce.soap.partner.PartnerConnection.describeSObject(PartnerConnection.java:1422)
        at com.salesforce.dataloader.client.PartnerClient$10.run(PartnerClient.java:185)
        at com.salesforce.dataloader.client.PartnerClient$10.run(PartnerClient.java:177)
        at com.salesforce.dataloader.client.PartnerClient.runOperation(PartnerClient.java:328)
        at com.salesforce.dataloader.client.PartnerClient.describeSObject(PartnerClient.java:726)
        at com.salesforce.dataloader.client.PartnerClient.setFieldTypes(PartnerClient.java:679)
        at com.salesforce.dataloader.controller.Controller.setFieldTypes(Controller.java:130)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:138)
        ... 2 more
The output doesn't provide a clear picture of where the error message is, however it does point to some invalid tables. Below is a redacted example of my process-conf.xml file for the Allocation bean:
<bean id="csvAllocationExtractProcess"
          class="com.salesforce.dataloader.process.ProcessRunner"
          singleton="false">
      <description>csvAllocationExtract job."</description>
        <property name="name" value="csvAllocationExtract"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.debugMessages" value="false"/>
                <entry key="sfdc.debugMessagesFile" value="C:\Users\test_user\Desktop\salesforce_backup\sfdcSoapTrace.log"/>
                <entry key="sfdc.endpoint" value="https://na1.salesforce.com"/>
                <entry key="sfdc.username" value=test_account@somecompany.com"/>
                <entry key="sfdc.password" value="somepassword"/>
                <entry key="process.encryptionKeyFile" value="C:\Program Files (x86)\salesforce.com\Data Loader\akeyfile.txt"/>
                <entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.entity" value="Allocation"/>
                <entry key="sfdc.extractionRequestSize" value="500"/>
                <entry key="sfdc.extractionSOQL" value="Select Id, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM Allocation__c"/>
                <entry key="process.operation" value="extract"/>
                <entry key="dataAccess.type" value="csvWrite"/>
                <entry key="dataAccess.name" value="C:\Users\test_user\Desktop\salesforce_backup\sf_allocation.csv"/>
            </map>
        </property>
    </bean>
Any ideas where the issue is here? All of my other SOQL tables without the '__c' suffix work fine without issue.
 
How do I direct the Salesforce Data Loader program for Windows operating systems to back up multiple tables defined in a sample process-conf.xml file? I've tried multiple entry keys like the one below in one <bean> and multiple <bean> ID's with different names directed at each entry key to no avail:
<entry key="sfdc.extractionSOQL" value="





 
I am using data loader from command line to extract data in csv format. I have to hard code the SOQL query everytime in the sfdc.extractionSOQL property. Is there a way to get the field names dynamically and create a query from it? I need to select all fields dynamically and run the SOQL query. Below is the bean, I am using:
<bean id="csvAccountExtractProcess"
      class="com.salesforce.dataloader.process.ProcessRunner"
      singleton="false">
  <description>csvAccountExtract job gets account info from salesforce and saves info into a CSV file."</description>
    <property name="name" value="csvAccountExtract"/>
    <property name="configOverrideMap">
        <map>
            <entry key="sfdc.debugMessages" value="false"/>
            <entry key="sfdc.debugMessagesFile" value="c:\dataloader\samples\status\sfdcSoapTrace.log"/>
            <entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
            <entry key="sfdc.username" value="user@mycompany.com"/>
            <!-- password specified below is invalid, please generate one using the encrypt.bat utility -->
            <entry key="sfdc.password" value="1111111111111111"/>
            <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, Type, ParentId, Phone, AccountNumber, Website, Sic, AnnualRevenue, NumberOfEmployees, TickerSymbol, Oracle_Id__c FROM Account"/>
            <entry key="process.operation" value="extract"/>
            <entry key="process.mappingFile" value="c:\dataloader\samples\conf\accountExtractMap.sdl"/>
            <entry key="dataAccess.type" value="csvWrite"/>
            <entry key="dataAccess.name" value="c:\dataloader\samples\data\extract.csv"/>
        </map>
    </property>
</bean>