+ Start a Discussion
arasuarasu 

Failed to deploy Controller to Prod(100% covr)Failed to login:UNKNOWN_EXCEPTION

Hi,
I have got 100% coverage for this visualforce Controller Extension that I am trying to deploy to production. But when I try to deploy using ant, I get the following exception:
Code:
C:\workzone\Salesforce-ant\sample>ant -verbose deploy
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0_06\jre
Detected OS: Windows XP
parsing buildfile C:\workzone\Salesforce-ant\sample\build.xml with URI = file:/C
:/workzone/Salesforce-ant/sample/build.xml
Project base dir set to: C:\workzone\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:\workzone\Salesforce-ant\sample\build.properties
 [property] Loading Environment env.
Build sequence for target(s) `deploy' is [deploy]
Complete build sequence is [deploy, deployUnpackaged, probe-proxy, proxy, retrie
veUnpackaged, test, ]

deploy:
parsing buildfile jar:file:/C:/apache-ant-1.7.0/lib/ant-salesforce.jar!/com/sale
sforce/antlib.xml with URI = jar:file:/C:/apache-ant-1.7.0/lib/ant-salesforce.ja
r!/com/salesforce/antlib.xml
[sf:compileAndTest] compileAndTest on https://www.salesforce.com/services/Soap/u
/10.0, compiling 1 classes and 0 triggers, deleting 0 classes and 0 triggers
[sf:compileAndTest] note: use ant -verbose to get more information on the failur
e

BUILD FAILED
C:\workzone\Salesforce-ant\sample\build.xml:45: Failed to login:UNKNOWN_EXCEPTIO
N: An error occurred on your page.
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:190)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a: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(DefaultExe
cutor.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.SoapFaultException: UNKNOWN_EXCEPTION: An error occurre
d on your page.
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection
.java:168)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:11
2)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92)
        at com.sforce.soap.apex.SoapConnection.compileAndTest(SoapConnection.jav
a:150)
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:132)
        ... 17 more
--- Nested Exception ---
com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An error occurred on your p
age.
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection
.java:168)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:11
2)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92)
        at com.sforce.soap.apex.SoapConnection.compileAndTest(SoapConnection.jav
a:150)
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:132)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a: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(DefaultExe
cutor.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)

Total time: 1 second

 
The username, password and other proxy settings are all set correctly in the build.xml and build.properties file.
Would greatly appreciate if anyone can throw some light on this.
 
Thanks
ETFETF
arasu, where you able to find a solution to the problem?  I have exactly the same problem...  Thanks!
 
wesnoltewesnolte
I've had this before. I just reran the task a while later and it worked.