function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Greg HGreg H 

Error with Deployment - Invalid version specified:12.0

I created an Apex trigger in Sandbox.  I am now trying to deploy the Trigger using the Force.com IDE for Eclipse.  When I get to the step where I "Validate Deployment" it results in a failure.
Deployment Log:
*** Deployment Log ***
Result: FAILED

...

# Deploy Results:
 Name: unpackaged/package.xml
 Action: NO ACTION
 Result: FAILED
 Problem: Invalid version specified:12.0

Does anyone know why this is happening?  Could it be because our Sandbox was already upgraded to the Spring 08 (API version 12.0) release and our production instance wasn't yet (still API version 11.1)?
-greg
JonPJonP
Greg,

We'll see if we can reproduce that.  In the meantime, try manually editing the <version> tag toward the bottom of package.xml to say <version>11.0</version> and see if that fixes things.

Jon
cwall_sfdccwall_sfdc
Hey Greg.

Could you manually edit src/unpackaged/package.xml changing "12.0" to "11.0".  Sorry for the inconvenience.

-Chris


Message Edited by cwall_sfdc on 01-30-2008 05:54 PM
Greg HGreg H

Thanks for the feedback on this.  I made the change you guys suggested and that resolved the issue I originally posted about but now it's giving another error:

Code:
*** Deployment Log ***
Result: FAILED
Executed on: January 31, 2008 10:23:38 AM MST

# Deployed From
   Project name: Sandbox
   Username: greg@00000.com
   Endpoint: https://test.salesforce.com/services/Soap/u/11.1

# Deployed To
   Username: greg@00000.com
   Endpoint: https://www.salesforce.com/services/Soap/u/11.1

# Deploy Results:
   Name:    unpackaged/triggers/linkAPLtoOpportunity.trigger-meta.xml
   Action:  NO ACTION
   Result:  FAILED
   Problem: Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}active invalid at this location

   Name:    unpackaged/package.xml
   Action:  UPDATED
   Result:  SUCCESS
   Problem: n/a

Any additional pointers?

-greg

JonPJonP
Looks like this is the same problem.  The .trigger-meta.xml (and .cls-meta.xml) files associated with each Apex Trigger or Class also contains a version #.  If you manually edit these files to say <apiVersion>11.1</apiVersion> they should work with your prod org.

Besides package.xml, these should be the only other files affected by this bug.
Greg HGreg H
I thought that too but even after I made the update it gave the same error I just posted.  Do you think this issue goes away after my production org moves to Spring 08?  Should I try deploying this code another way?
-greg
JoeK.ax278JoeK.ax278
FWIW, We're stuck on the same problem -- We're still unable to deploy Apex code for a go-live that is currently underway. We've started trying to use a current download of the Ant tool, but are having some troubles getting that to work as well.
JoeK.ax278JoeK.ax278
Update: We've manage to use the Ant tool to deploy a trigger from a Spring 08 sandbox to production. The hardest parts were (1) realizing the documentation from the Apex Code manual we were using didn't apply to the current version of the ant tool we'd downloaded and (2) discovering that our .trigger files all had to be renamed to .tgr files for the Ant tool.

Also, in parallel, we managed to reinstall eclipse, and then re-install the old eclipse plugin. We had some trouble finding instructions for this online, so we uncovered some old notes (Thank you, Tom Scott!):

1. Double click the *Eclipse.exe* icon to launch Eclipse

2. Click *Help | Software Updates | Find and Install…*

a. Select Search for new features and click *Next*

3. In the *Update sites to visit* dialog box, check the box at the bottom
to *Automatically select mirrors*

4. Click *New Remote Site…*

a. *Name*: Apex Toolkit

b. *URL*: http://www.adnsandbox.com/eclipsetoolkit/10.0/

c. Click *OK*

5. Ensure that the *Callisto Discovery Site* and the new *Apex
Toolkit*are checked and click
*Finish*

6. In the *Search Results* dialog box, check the *Apex Toolkit* box and
like *Select Required *to make the boxes checked as pictured below, then
click *Next*

We've not actually promoted code with the old toolkit, but it appears to be working as before for reading and comparing and validating triggers. (Note: we installed the old toolkit on a fresh install of Eclipse Europa, not Callisto)

T&E -- JoeK
Bill EidsonBill Eidson
  Yes, this issue will go away when the release that currently on Sandbox goes onto the production servers.

In the meantime, to deploy to production:

* Change the package.xml version is set to 11.0.
* For all the Apex Code/trigger -meta.xml, make sure you set the version to 11.0 (assuming you aren't using any new 12.0 features, there should be no problem just changing it either in the UI or in the XML file).
* In the -meta.xml files for .trigger, remove the element 'active'.

  Sorry for the inconvenience.

  Thanks,

  - Bill
NareshNaresh
Bill, This does not allow me to remove the active tag from Apex Code/trigger -meta.xml files. I tried to remove the active tag twice but when i tried to save, it REVERT back the active tag.

I also change the package.xml version set to 11.0. Also for all the Apex Code/trigger -meta.xml, i am set the version to 11.0. But its not working. It's giving me the same error.

any idea?

Thanks in Advance

NG
NareshNaresh
Hi,
I am getting the same error while deploying the Apex Trigger to production. Kindly post me if you find any solution.

Thanks in advance,
NG

JoeK.ax278JoeK.ax278
We have been able to successfully migrate Apex code from a Spring '08 sandbox to production using the new eclipse force.com IDE. It is necessary to manually change all the xml references from version "12.0" to the version you need and to manually remove all the "active" elements in every trigger xml file.

These changes must be re-applied after every refresh in eclipse, as it overwrites any changes in the XML files.

Note that we were able to promote some code using the old toolkit, but we hit a different snag there: some of our triggers required 11.x API features (Campaign.ParentId), and the old toolkit appears to be tied to the 10.0 endpoint. I'm not sure whether it is possible to change this in the old toolkit.

T&E -- JoeK
NareshNaresh
Thanks for the quick response Joe. But i am getting the problem to remove the active tag from the trigger xml file. When i try to remove the active tag and go for the save, the active tag again automatically add to the xml file. I am using eclipse IDE and latest Apex Toolkit for deployment.

Can u please post me if you have any idea?

Thanks in advance
NG
JoeK.ax278JoeK.ax278
Naresh,

We're not seeing the behavior you report. We just tested again. We removed the active element and chose file > save, and the change stayed in effect. Make sure you are NOT refreshing -- this is what overwrites the change for us.

Think & Enjoy -- JoeK
Greg HGreg H
Naresh - I was never able to resolve this issue.  And I can also confirm the issue you are encountering when you try to remove the <active> tag.  If I remove the tag and save - the tag gets added again anyway and the code refreshes automatically.  Sometimes it contains a false value and sometimes a true value.
 
I tried to develop the trigger in a developer edition org and move from there but that isn't working either.
 
This has become a headache and, therefore, I have decided to wait to rollout my trigger until our production org is upgraded to 12.0.
-greg
JoeK.ax278JoeK.ax278
Greg H,

This might be an important distinction, then: You report that you're moving from a development org to a production org. We, on the other hand, are promoting from a sandbox that was built from production and then upgraded by SF to spring 08 recently. I think I've seen some other things in force.com behaving differently when running on our sandbox than when running on my own development org.

Think & Enjoy -- JoeK
Greg HGreg H
Actually, my point was that I've tried it both ways.  All of the error messages I've been posting here were received while trying to deploy from Sandbox to Production.
-greg
Bill EidsonBill Eidson
   In Eclipse, if you right click on the project and say 'work offline', you can make the changes (removing <active>, etc.) without having Eclipse save & refresh the change, and you can then deploy to production.  Sorry for the inconvenience.

   Thanks,

   - Bill
NareshNaresh
Thanks a lot Bill,

This helped me to resolve the issue.

Thanks again for all your help,

NG
Bill EidsonBill Eidson

  Yes, sorry for not mentioning this in my initial post, in Eclipse, right click on the project and say 'work-offline'.  Once offline, Eclipse will no longer save/refresh the files from the organization.

  Thanks,

  - Bill

MyGodItsColdMyGodItsCold
I did as you suggested. I went off line & made changes to the trigger.xml, the testMethodclass.xml, and the unpackaged/package.xml.
 
Then, to deploy, I went back online & tried to deploy, but the unpackaged/package.xml was changed to api 12.0.
 
Are you saying that after making the changes off line, the ant -deploy command should be issued at the command prompt?
Bill EidsonBill Eidson

  Provided you saved all the changes while in offline mode, when you go online then to deploy, Eclipse shouldn't be overwriting your changes. If it's still not working for you, feel free to contact me offline & we can troubleshoot it together.

  Thanks,

  - Bill

MyGodItsColdMyGodItsCold
Thanks, I just sent a message w/ contact info - or msg me with yours. Thanks.