4

I'm using the Force Migration Tool (Ant Task) and getting an error on a deploy command:

<target name="deployCode">
    <sf:deploy 
        username="${sf.usernameDestination}" 
        password="${sf.passwordDestination}" 
        serverurl="${sf.serverUrlDestination}" 
        deployRoot="code" 
        rollbackOnError="true"/>
</target>

I am getting the following error:

build.xml:23: Failed to login: UNSUPPORTED_API_VERSION - Invalid Api version specified on URL

As I am deploying to a sandbox, the value for ${sf.serverUrlDestination} is https://test.salesforce.com.

I've verified the username and password values and they are correct.

4

If you just downloaded the latest version, and your sandbox hasn't been upgraded yet, you'd receive this error. Try getting an older version, it wait until the final upgrade later this month.

  • 1
    Thanks for the answer. I assume you mean the Migration Tool version? – Swisher Sweet Feb 13 '15 at 18:25
  • 1
    Yes, the Migration Tool embeds a particular API version within it. You'll have to wait for your environment to catch up. – sfdcfox Feb 13 '15 at 18:36
  • I downloaded the Salesforce Ant task from the older sandbox and used that. Worked like a charm. Had to set my version on the package.xml to 32.0 instead of 33.0. – Swisher Sweet Feb 16 '15 at 16:34
1

I also faced same issue and resolved it by downloading similar version ( what my org was having) of ant-salesforce jar file and put that in to lib folder of apache ant folder.

Here is the below URL you may download

Note: Here you may put any version number in place of 'nn' in below URL as per your org you are working with

https://gs0.salesforce.com/dwnld/SfdcAnt/salesforce_ant_nn.0.zip

for example for for 36.0 https://gs0.salesforce.com/dwnld/SfdcAnt/salesforce_ant_nn.0.zip

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.