+ Start a Discussion
Jefe55Jefe55 

Migration Tool / Ant Login

I'm trying to get started using the Migration Tool.  In order to do that, I need Ant working.  I have set up the Variable Environments but I can't seem to connect using the build.properties file.

 

I have tried both with the security token and without.  It's a developer account.  When I try the "ant test" command I get an error "build.xlm: 9 Invalid Username, password or security token"

 

I'm sure of the password and am not locked out.  Any help is greatly appreciated.

 

 

My file looks like the following:

 

 # build.properties

#

 

# Specify the login credentials for the desired Salesforce organization

sf.username = dev@***

sf.password = *****

 

#sf.pkgName = <Insert comma separated package names to be retrieved>

#sf.zipFile = <Insert path of the zipfile to be retrieved>

#sf.metadataType = <Insert metadata type name for which listMetadata or bulkRetrieve operations are to be performed>

 

# Use 'https://www.salesforce.com' for production or developer edition (the default if not specified).

# Use 'https://test.salesforce.com for sandbox.

 

sf.serverurl = https://www.salesforce.com

 

# If your network requires an HTTP proxy, see http://ant.apache.org/manual/proxy.html for configuration.

#


jim_lukensjim_lukens

I am having the same issue - I am sure there is a typo in there somewhere can some post a correct version of the build.properties file - minus the real login info :-) Thanks

jim_lukensjim_lukens

So I had to bypass the properties file. Not sure why. There has to be a typo or error of some kind in the sample file. When I use the build file directly with same parameters it works fine.

justajaynejustajayne

I am also having issues connecting. I installed JAVA, Installed ANT & tested both which work. I then downloaded the migration tool and am in the process of updating the build file. I updated my username, password, and serverurl (https:login.salesforce.com) but unfortunately when i run ant test in the command prompt for the sample directory file I get the following error. I am wondering if there are other items in the build file that need to be updated (ex package info). If anyone can assit it would be greatly appreciated!!!

 


C:\Program Files\sample>ant test
Buildfile: C:\Program Files\sample\build.xml

test:
[sf:deploy] Note: use ant -verbose to get more information on the failure

BUILD FAILED
C:\Program Files\sample\build.xml:9: Failed to login: Failed to send request to
https://${https://login.salesforce.com}/services/Soap/u/23.0

Total time: 3 seconds

C:\Program Files\sample>ant -verbose
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Trying the default build file: build.xml
Buildfile: C:\Program Files\sample\build.xml
Detected Java version: 1.7 in: C:\Program Files\Java\jdk1.7.0_01\jre
Detected OS: Windows 7
parsing buildfile C:\Program Files\sample\build.xml with URI = file:/C:/Program%
20Files/sample/build.xml
Project base dir set to: C:\Program Files\sample
parsing buildfile jar:file:/C:/Program%20Files/apache-ant-1.8.2/lib/ant.jar!/org
/apache/tools/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/apache-ant-
1.8.2/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
 [property] Loading C:\Program Files\sample\build.properties
 [property] Loading Environment env.
Build sequence for target(s) `test' is [test]
Complete build sequence is [test, listMetadata, deployCode, deployCodeFailingTes
t, retrieveCode, deployCodeCheckOnly, retrieveUnpackaged, retrievePkg, bulkRetri
eve, describeMetadata, deployUnpackaged, undeployCode, deployZip, ]

test:
parsing buildfile jar:file:/C:/Program%20Files/apache-ant-1.8.2/lib/ant-salesfor
ce.jar!/com/salesforce/antlib.xml with URI = jar:file:/C:/Program%20Files/apache
-ant-1.8.2/lib/ant-salesforce.jar!/com/salesforce/antlib.xml from a zip file
Property "dahenriq@rci.rutgers.edu" has not been set
Property "Mickey44GChc3s5tDW0KfJAgMlhXPcMWL" has not been set
Property "https://login.salesforce.com" has not been set
[sf:deploy] Note: use ant -verbose to get more information on the failure

BUILD FAILED
C:\Program Files\sample\build.xml:9: Failed to login: Failed to send request to
https://${https://login.salesforce.com}/services/Soap/u/23.0
        at com.salesforce.ant.SFDCAntTask.doLogin(SFDCAntTask.java:218)
        at com.salesforce.ant.SFDCAntTask.getMetadataConnection(SFDCAntTask.java
:248)
        at com.salesforce.ant.SFDCMDAPIAntTaskRunner.runTask(SFDCMDAPIAntTaskRun
ner.java:16)
        at com.salesforce.ant.DeployTask.execute(DeployTask.java:59)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: com.sforce.ws.ConnectionException: Failed to send request to https://
${https://login.salesforce.com}/services/Soap/u/23.0
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:120)
        at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.jav
a:872)
        at com.salesforce.ant.SFDCAntTask.doLogin(SFDCAntTask.java:212)
        ... 20 more
Caused by: java.net.UnknownHostException: ${https
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:176)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:612)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160
)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:483)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:278)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:335)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewH
ttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:971)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect
(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLCo
nnection.java:1087)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Htt
psURLConnectionImpl.java:250)
        at com.sforce.ws.transport.JdkHttpTransport.connectRaw(JdkHttpTransport.
java:133)
        at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTranspor
t.java:97)
        at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTranspor
t.java:92)
        at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.jav
a:88)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:94)
        ... 22 more

Total time: 3 seconds

C:\Program Files\sample>

ChaithChaith

facing the same issue here. Its with proxy problem, can we check the username, password,url etc in the command prompt?

singhssinghs

Hi,

Did you find any workaround to this?

pratima sripratima sri
Hi was  anyone able to solve this issue? Facing the same issue.