You need to sign in to do that
Don't have an account?
MVJ
Deploying APEX Code
I am trying to deploy APEX code using the process outlined by SFDC. I keep getting a login faluire. I am behind a fire wall and will all other programs I need to make sure that I supply a proxy. However, I do not see any instructions for deploying from behind a firewall.
Are there any better instructions for deploying code from your DEV or SANDBOX to Production.
Thanks
Mike Viola
I have opened a ticket and am working with my support team. It is deffinitley the proxy settings. When I run the deploy on another workstation that is not behind the firewall it works just fine.
I will update the posting when I get more information
Buildfile: build.xml
[sf:compileAndTest] compileAndTest on https://test.salesforce.com/services/Soap/
u/10.0, compiling 1 classes and 1 triggers, deleting 0 classes and 0 triggers
[sf:compileAndTest] note: use ant -verbose to get more information on the failure
C:\salesforce_ant\sample\build.xml:9: Failed to login:Failed to send request to
https://test.salesforce.com/services/Soap/u/10.0
C:\salesforce_ant\sample>
I tried to setting up environment variable ANT_OPTS, but still doesn't work... Any help would be much appreciated!
C:\salesforce_ant\sample>ant -verbose
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Detected Java version: 1.6 in: c:\Progra~1\Java\jdk1.6.0_02\jre
Detected OS: Windows XP
parsing buildfile C:\salesforce_ant\sample\build.xml with URI = file:/C:/salesfo
rce_ant/sample/build.xml
Project base dir set to: C:\salesforce_ant\sample
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
[property] Loading C:\salesforce_ant\sample\build.properties
[property] Loading Environment env.
[setproxy] Setting proxy to proxy:8080
Total time: 0 seconds
Thank you,
Mei
Please re-download the .zip and re-copy the jar into ant/lib.
Pulled it down ran it again and NO SUCH LUCK:
D:\SFDC\APEX\sample>ant deploy -Dhttp.ProxyHost=Bastion2.us.dnb.com -Dhttp.ProxyPort=8080
Buildfile: build.xml
deploy:
[sf:compileAndTest] compileAndTest on https://WWW.salesforce.com for sandbox/services/Soap/u/10.0, c
ompiling 1 classes and 1 triggers, deleting 0 classes and 0 triggers
[sf:compileAndTest] note: use ant -verbose to get more information on the failure
BUILD FAILED
D:\SFDC\APEX\sample\build.xml:9: Failed to login:Failed to send request to https://WWW.salesforce.co
m for sandbox/services/Soap/u/10.0
Total time: 0 seconds
D:\SFDC\APEX\sample>ant deploy -Dhttp.ProxyHost=Bastion2.us.dnb.com -Dhttp.ProxyPort=8080 -verbose
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jre1.6.0_02
Detected OS: Windows 2000
parsing buildfile D:\SFDC\APEX\sample\build.xml with URI = file:/D:/SFDC/APEX/sample/build.xml
Project base dir set to: D:\SFDC\APEX\sample
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.x
ml. It could not be found.
[property] Loading D:\SFDC\APEX\sample\build.properties
[property] Loading Environment env.
Build sequence for target(s) `deploy' is [deploy]
Complete build sequence is [deploy, delete, ]
deploy:
parsing buildfile jar:file:/D:/SFDC/ANT/apache-ant-1.7.0/lib/ant-salesforce.jar!/com/salesforce/antl
ib.xml with URI = jar:file:/D:/SFDC/ANT/apache-ant-1.7.0/lib/ant-salesforce.jar!/com/salesforce/antl
ib.xml
[sf:compileAndTest] compileAndTest on https://WWW.salesforce.com for sandbox/services/Soap/u/10.0, c
ompiling 1 classes and 1 triggers, deleting 0 classes and 0 triggers
[sf:compileAndTest] note: use ant -verbose to get more information on the failure
BUILD FAILED
D:\SFDC\APEX\sample\build.xml:9: Failed to login:Failed to send request to https://WWW.salesforce.co
m for sandbox/services/Soap/u/10.0
at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:187)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: com.sforce.ws.ConnectionException: Failed to send request to https://WWW.salesforce.com f
or sandbox/services/Soap/u/10.0
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:95)
at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.java:1193)
at com.sforce.soap.partner.PartnerConnection.<init>(PartnerConnection.java:301)
at com.sforce.soap.partner.Connector.newConnection(Connector.java:27)
at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:120)
... 17 more
Caused by: java.net.UnknownHostException: WWW.salesforce.com for sandbox
at java.net.PlainSocketImpl.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.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown So
urce)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:115)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:88)
... 21 more
--- Nested Exception ---
com.sforce.ws.ConnectionException: Failed to send request to https://WWW.salesforce.com for sandbox/
services/Soap/u/10.0
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:95)
at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.java:1193)
at com.sforce.soap.partner.PartnerConnection.<init>(PartnerConnection.java:301)
at com.sforce.soap.partner.Connector.newConnection(Connector.java:27)
at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:120)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.net.UnknownHostException: WWW.salesforce.com for sandbox
at java.net.PlainSocketImpl.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.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown So
urce)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:115)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:88)
... 21 more
Total time: 1 second
D:\SFDC\APEX\sample>
It should now be logging to indicate that a proxy was specified & I don't see that in the log, so somehow the settings aren't being picked up.
Can you try the setProxy task as described here, http://ant.apache.org/manual/proxy.html, since that's the simplest way... If, doing that, you still don't see the log indicating a proxy is being used, double check that ant is picking up the right .jar.
If you still have problems, please contact me offline & we can troubleshoot this together.
Thanks,
- Bill
proxy.port = 8080
The ant URL is: http://www.salesforce.com/downloads/ApexTools/salesforce_ant.zip