2

I am having a rather unique problem getting Apex Data Loader to run from the console. It works great from the GUI, but as soon as I attempt to run process.bat, it blows up from what I can tell during the loading of process-conf.xml. The following is the log from when it runs:

C:\Program Files (x86)\salesforce.com\Data Loader\bin>process.bat ..\conf InstanceTrustRecords
2015-05-28 14:37:04,842 INFO  [main] controller.Controller initLog (Controller.java:382) - Reading log-conf.xml in C:\Program Files (x86)\salesforce.com\Data Loader\bin\log-conf.xml
2015-05-28 14:37:04,860 INFO  [main] controller.Controller initLog (Controller.java:391) - The log has been initialized
2015-05-28 14:37:04,864 INFO  [main] process.ProcessConfig getBeanFactory (ProcessConfig.java:103) - Loading process configuration from config file: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml
2015-05-28 14:37:04,921 INFO  [main] support.AbstractApplicationContext prepareRefresh (AbstractApplicationContext.java:495) - Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@1f8c6df: startup date [Thu May 28
14:37:04 CDT 2015]; root of context hierarchy
2015-05-28 14:37:04,952 INFO  [main] xml.XmlBeanDefinitionReader loadBeanDefinitions (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from URL [file://C:/Program Files (x86)/salesforce.com/Data Loader/conf/process-conf.xml]
2015-05-28 14:37:14,330 ERROR [main] process.ProcessConfig getProcessInstance (ProcessConfig.java:96) - Error loading process: InstanceTrustRecords configuration from config file: C:\Program Files (x86)\salesforce.com\Data Loader\conf\process-conf.xml
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from URL [file://C:/Program Files (x86)/salesforce.com/Data Loader/conf/process-conf.xml]; nested exception is java.net.UnknownHostException: C
        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:105)
        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.net.UnknownHostException: C
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.NetworkClient.openServer(Unknown Source)
        at sun.net.ftp.FtpClient.openServer(Unknown Source)
        at sun.net.ftp.FtpClient.openServer(Unknown Source)
        at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Source)
        at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:125)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
        ... 17 more
2015-05-28 14:37:14,333 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) - Failed to create process com.salesforce.dataloader.exception.ProcessInitializationException: Error loading process: InstanceTrustRecords configuration from config file: C:\Program Files (x86)\salesforce.com\Data Loader\conf\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 URL [file://C:/Program Files (x86)/salesforce.com/Data Loader/conf/process-conf.xml]; nested exception is java.net.UnknownHostException: C
        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:105)
        at com.salesforce.dataloader.process.ProcessConfig.getProcessInstance(ProcessConfig.java:93)
        ... 3 more
Caused by: java.net.UnknownHostException: C
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.NetworkClient.openServer(Unknown Source)
        at sun.net.ftp.FtpClient.openServer(Unknown Source)
        at sun.net.ftp.FtpClient.openServer(Unknown Source)
        at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Source)
        at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:125)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
        ... 17 more

The following is the contents of my process-conf.xml file, edited only for security reasons:

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="InstanceTrustRecords" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false"> <description>Processes data received from the Trust platform and creates InstanceTrustRecord objects on the associated Instance objects.</description> <property name="name" value="InstanceTrustRecords"/> <property name="configOverrideMap"> <map> <entry key="sfdc.endpoint" value="https://test.salesforce.com"/> <entry key="sfdc.username" value="user@domain.com"/> <entry key="sfdc.password" value="password_hash"/> <entry key="process.encryptionKeyFile" value="C:\Temp\key.txt"/> <entry key="sfdc.timeoutSecs" value="600"/> <entry key="sfdc.loadBatchSize" value="200"/> <entry key="sfdc.entity" value="InstanceTrustRecord__c"/> <entry key="process.operation" value="insert"/> <entry key="process.mappingFile" value="C:\Temp\InstanceTrustRecord.sdl"/> <entry key="process.outputError" value="C:\Temp\errorInsertInstanceTrustRecords.log"/> <entry key="process.outputSuccess" value="C:\Temp\successInsertInstanceTrustRecords.log"/> <entry key="dataAccess.name" value="C:\Temp\InstanceDataSample Test.csv"/> <entry key="dataAccess.type" value="csvRead"/> <entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800"/> </map> </property> </bean> </beans>

I am using the latest build available (34.0), and the Java version is 1.8.0_45. I've spent days trying to figure out what's going on, and would appreciate help finding the issue. It's either a bizarre bug, or I'm overlooking a very obvious configuration issue in my frustration.

1

I've run into the same issue at my organization when using the latest instance of the Data Loader tool (34.0 - Summer 2015). To solve this, I was able to locate an older copy of Data Loader (luckily someone at my organization had an older copy zipped up) and utilize it instead. Using the older version worked just fine, which leads me to believe that this is an issue with the newest release.

  • An interesting idea, and one I've considered as well. I ran out of time at work trying to find a solution, so I've moved on a 3rd party tool (Jitterbit) which fulfilled our needs precisely and with a lot less effort in the end. Having said that, I will likely revisit this in the future and either wait for a revision to their code in the current release or attempt to secure an older copy myself. – Christopher Dundon Jun 12 '15 at 17:58
0

I think you need to specify the host & proxy attributes as the error says "java.net.UnknownHostException".

<entry key="sfdc.proxyHost" value="0.000.000.00" />
<entry key="sfdc.proxyPort" value="00" />

You can find the proxy settings from your browser. Hope this may help.

  • Not a bad idea, however my office does not use a proxy. Even adding these keys just in case does not change the outcome, alas. What I find most strange about this is that even though the object starts out as a FileSystemXmlApplicationContext, it ends up trying to open a FTP connection when getInputStream is called. – Christopher Dundon Jun 3 '15 at 19:02
0

I had the same issue. Got it working simply by changing the parameter for the path to conf when calling process.bat

Instead of: process.bat ..\conf blahblah

I put: process.bat "\\localhost\C$\Program Files...etc\conf" blahblah

Doing that solved my problem! The clue for me was in "UnknownHostException: C"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.