11

Question

Is anyone experiencing issues with incorrect managed package apex class visibility? Suddenly unable to save a class and everything seems to be in order. What am I missing? Anyone run into this or have workarounds?

Update

Seems like this is an issue with the Tooling API. Was using Sublime Text 3 + Maven's Mate, and switching from Tooling to Metadata apex compilation (which I seem to do daily now) resolved the issue.

Background

Editing a class that refers to a Zuora class.

Zuora.OnDemandSyncManager syncManager = new Zuora.OnDemandSyncManager();

Previously this had saved fine, but now I'm getting the following error

Package Visibility: Type is not visible: ondemandsyncmanager

However the constructor is listed as global when I view the installed package components (v2.4)

Managed Package Components

Which matches the version settings for my class.

Class Meta File

  • 1
    Anyone know how to keep images from MBP retina's from looking so huge in stack exchange? Another Q? [S.M]] – Ralph Callaway Nov 15 '13 at 21:32
  • 1
    I've noticed the Tooling API (using MavensMate) has issues with managed packages. I couldn't compile a class for example, that was named the same as something in a managed package in my instance (i.e. the compiler wasn't considering the namespace difference). – greenstork Nov 15 '13 at 22:04
  • I wonder if this is a MM issue or whether it's a tooling API issue – Ralph Callaway Nov 15 '13 at 22:55
  • I think it is a tooling issue - I add the same problem a while back with this happening in the Dev Console. I reported it to support, but the odd thing was that it worked in another org on NA15 with the same package. I think I ended up removing the package and re-installing it, and it worked after that... – BritishBoyinDC Nov 15 '13 at 22:58
  • 1
    I am using MavensMate. I switched to the Metadata api, but I'll more often get "Read Timeout" errors now for some reason. Damned if you do, damned if you don't as "they" say. – James Loghry Sep 8 '14 at 21:29
9

Based on user comments this appears to be a bug in the Tooling API. Switching to a tool that uses the Metadata API resolves the issue (maven's mate w/config changes OR eclipse OR ant)

Update

So it's not a bug per se, more of a doc issue. The tooling api docs don't specify how to set the api versions for managed packages (at least at this time), although you can infer how to do it by looking at the tooling api wsdl. Because of this some tools, i.e. MM doesn't set the api versions for managed packages when updating apex classes ...

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.