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
Mike LeachMike Leach 

Error: "Cannot reduce the global visibility of interface method"

Trying to move code between 2 development edition orgs using ant-salesforce.jar (v25) and receiving this error on a class generated by Apex2WSDL.


Error: Cannot reduce the global visibility of interface method: Integer compareTo(Object) from Comparable


The target org is still on Summer '12 v25. Verified the meta version for this class is also v25.


The code in question was auto-generated by Apex2WSDL. The outer class is public (not global) as is the inner class implementing comparable.


Did something change recently requiring that interfaces be global?


Any thoughts, suggestion, ideas on how to resolve this error?




Is it all new code or replacing existing code? Is the target instance a managed package?  Shot in the dark but once interfaces are defined as global in a managed package, they cannot be changed back tp public.

Mike LeachMike Leach

Good guess. The source is from a managed package, pushed to a git repo.


Trying to pull source from git and ant deploy into a fresh Summer '12 DE (non-managed).

Mike LeachMike Leach

Odd. I can deploy this code to a Winter '13 org using v26 version of ant migration tool.


Writing this off as a weird v25/26 transition anamoly and will wait for all DE orgs to catch up to Winter '13.


Thanks for chiming in with an idea!