+ Start a Discussion
Tomas.RayTomas.Ray 

dataloader and commandline issue - java.net.ConnectException: Connection refused: connect

I have written windows batch script to run apex data loader job every hour. I has run for 2 months without issue.
Today I am deploying the script to new windows 7 and used the lastest Dataloader v34.

Then the script got an issue as below:

15-06-24 15:27:26,841 INFO  [main] xml.XmlBeanDefinitionReader loadBeanDefinitions (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from URL [file://C:/dataloader/config/process-conf.xml]
2015-06-24 15:27:29,236 ERROR [main] process.ProcessConfig getProcessInstance (ProcessConfig.java:96) - Error loading process: SFDCBuyerOrder configuration from config file: C:\dataloader\config\process-conf.xml
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from URL [file://C:/dataloader/config/process-conf.xml]; nested exception is java.net.ConnectException: Connection refused: connect
    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.(FileSystemXmlApplicationContext.java:140)
    at org.springframework.context.support.FileSystemXmlApplicationContext.(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.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.ftp.impl.FtpClient.doConnect(Unknown Source)
    at sun.net.ftp.impl.FtpClient.tryConnect(Unknown Source)
    at sun.net.ftp.impl.FtpClient.connect(Unknown Source)
    at sun.net.ftp.impl.FtpClient.connect(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


At first, I suspect it was a server issue. But finally after google the whole afternoon,  I changed to old version of Dataloader 32. The error is gone.

Just wanna share with you, dont use dataloader 34 for command line job.


Regards,
Thomas
Amit Chaudhary 8Amit Chaudhary 8
Never Data loader latest Version. Same issue i have also faced.
data 8data 8
Could you please share the link for the older version of Dataloader 32. Thanks.
Rodrigo CruzRodrigo Cruz
Tomas, it seems that James found a solution:
 
James Thomson
I had the same problem yesterday and resolved it by changing the parameter in the call to process.bat. Instead of:

process "C:\Program Files (x86)\salesforce.com\Data Loader" tempCont

...try:

process "\\localhost\C$\Program Files (x86)\salesforce.com\Data Loader" tempCont

That fixed it for me after a few hours of head scratching! Seems to be a bug, as the documentation clearly instructed me to enter it as you did.

Data loader 33.0 doesn't have this error. I tested James suggestion and it work on both 34 and 33 versions.