You need to sign in to do that
Don't have an account?
Data Loader Command Line error
Hi all,
Following is my process-conf.xml file being used to define beans involved in upserting rows from csv to Salesforce.
When I run the process file(through .bat file), I am getting an error saying:
org.xml.sax.SAXParseException: The element type "map" must be terminated by the matching end-tag "/map>"
Which doesn't make sense to me because I have terminated map. Could this problem be deducted to some other cause?
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="UsageUpsert" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false">
<description>UsageInsert job gets the License and Usage record from the CSV file and upsert it into License and Usage custom object.</description>
<property name="name" value="UsageUpsert"/>
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="true"/></entry>
<entry key="sfdc.debugMessagesFile" value="C:\Program Files (x86)\Salesforce.com\Data Loader\UsageUpsert\UsageInsertSoapTrace.log"/></entry>
<entry key="sfdc.endpoint" value="https://test.salesforce.com"/></entry>
<entry key="sfdc.username" value="username@salesforcedomain.com"/></entry>
<entry key="sfdc.password" value="5-------------------------"/></entry>
<entry key="process.encryptionKeyFile" value="C:\Program Files (x86)\Salesforce.com\Data Loader\UsageUpsert\key.txt"/></entry>
<entry key="sfdc.timeoutSecs" value="600"/></entry>
<entry key="sfdc.loadBatchSize" value="200"/></entry>
<entry key="sfdc.externalIdField" value="License_and_Sandbox_Usage_Statistics_ID__c"></entry>
<entry key="sfdc.entity" value="License_and_Sandbox_Usage__c"/></entry>
<entry key="process.operation" value="upsert"/></entry>
<entry key="process.mappingFile" value="C:\Program Files (x86)\Salesforce.com\Data Loader\UsageUpsert\Mapping.sdl"/></entry>
<entry key="dataAccess.name" value="C:\Program Files (x86)\Salesforce.com\Data Loader\UsageUpsert\TestDataSet.csv"/></entry>
<entry key="dataAccess.type" value="csvRead"/></entry>
<entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800"/></entry>
<entry key="process.statusOutputDirectory" value="C:\Program Files (x86)\salesforce.com\Data Loader\UsageUpsert"></entry>
</map>
</property>
<p> </p>
</property></bean><p> </p>
</beans>
Yeah I did it initially but then it showed me that <beans> is not closed. But I don't know what happened it worked when I removed <p></p>.
Thank you very much for your guidance GSBasso!!! Your previous posts helped me too :)
Now jumping into creating a Windows Scheduler task to run the batch file on monthly basis.....
In summary, following stuffs were done to complete successful upsert from command line.
- Used parameters sfdc.proxypassword and sfdc.proxyUsername (should have realized this earlier...) in the process-conf.xml
- Removed </entry> and <p> </p> from process-conf.xml [Thanks GSBasso :) ]
- Copied the entire salesforce.com/data loader from C:\Program Files (x86) to Desktop
- Commented out <!--entry key="process.encryptionKeyFile" value="C\:\\Program Files (x86)\\Salesforce.com\\Data Loader\\UsageUpsert\\key.txt"/--> from process-conf.xml
- Placed all six files in one folder: process-conf.xml, config.properties,key.txt,mapping.sdl, testdata.csv, run.bat
- Unzipped dataloader-27.0.1-uber jar file. Copied log4j.xml to the folder consisting of aforementioned six files and renamed it log-conf.xml
All Answers
I suspect the issue is that your XML is not well-formed.
I've cleaned it up as follows:
Thanks for your time @GsBasso!!
But I am still in need of ya'll's help!!
The following error shows up if the entry tag is not closed...
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 26 in XML document from file process-conf.xml is invalid; nested exception is org.xml.sax.SAXParseException: The element type "entry" must be terminated by the matching end-tag "</entry>"
So, I still used </entry> closing tags.
And here are the complete errors I am receiving constantly when I...
1. Using built-in logging configuration, no log-conf.xml in C:\Program Files (x86)\salesforce.com\Data Loader\bin\log-conf.xml
For this I have unzipped the dataloader.jar file to locate log4j.xml....however, I don't know what or how to edit this line..how can i change the path? Of which file?
<param name="File" value="${java.io.tmpdir}/sdl.log" />
2.Error loading process: UsageUpsert configuration from config file: c:\program files (x86)\Salesforce.com\Data Loader\UsageUpsert\process-conf.xml
I do have config.properties, key.txt, mapping.sdl, testdata.csv, run.bat, and process-conf.xml ready. What else could be the problem?
3. org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 26 in XML document from file process-conf.xml is invalid; nested exception is org.xml.sax.SAXParseException: The element type "map" must be terminated by the matching end-tag "</map>"
Which doesn't make sense at all because I have terminated "map"
HELP!!!!!!
Thanks!! :)
Got pass the first error , two more to solve
1. Using built-in logging configuration, no log-conf.xml in C:\Program Files (x86)\salesfore.com\Data loader\bib\log-conf.xml
Extracted log4j from dataloader-27.0.1-uber.jar in data loader folder. Saved it as log-conf.xml in the bin directory.
Thanks GSBasso.
But now I have another same kind of error.
Element type "p" must be declared.
Along with,
Error Loading Process
Failed to run process
Get rid of all <p></p> lines. They are not needed.
Yeah I did it initially but then it showed me that <beans> is not closed. But I don't know what happened it worked when I removed <p></p>.
Thank you very much for your guidance GSBasso!!! Your previous posts helped me too :)
Now jumping into creating a Windows Scheduler task to run the batch file on monthly basis.....
In summary, following stuffs were done to complete successful upsert from command line.
- Used parameters sfdc.proxypassword and sfdc.proxyUsername (should have realized this earlier...) in the process-conf.xml
- Removed </entry> and <p> </p> from process-conf.xml [Thanks GSBasso :) ]
- Copied the entire salesforce.com/data loader from C:\Program Files (x86) to Desktop
- Commented out <!--entry key="process.encryptionKeyFile" value="C\:\\Program Files (x86)\\Salesforce.com\\Data Loader\\UsageUpsert\\key.txt"/--> from process-conf.xml
- Placed all six files in one folder: process-conf.xml, config.properties,key.txt,mapping.sdl, testdata.csv, run.bat
- Unzipped dataloader-27.0.1-uber jar file. Copied log4j.xml to the folder consisting of aforementioned six files and renamed it log-conf.xml