13

I'm getting an exception email from a client who has installed my Managed Package in his org. The error message I receive is:

Apex script unhandled trigger exception by user/organization: xxxxxxxx/xxxxxxxx

caused by: line 1, column 1: Dependent class is invalid and needs recompilation: ContentController: Dependent class is invalid and needs recompilation: System.test: line 32, column 17: Invalid type: Component.Apex.Page

What puzzles me is that how can a Managed Package class be marked invalid since its already compiled and packaged, plus when I login to the org having the issue, and open the respective class ContentController and I found the code is hidden because its managed class, and the Status shows as Valid and not invalid.

How can I fix this error? I can verify in dev org that the class is absolutely correct and code saves fine, no compilation error when saving the class code.

  • Can you compile "All Apex Classes" and check again to see if this issue still exist? – Devendra Oct 15 '16 at 10:54
  • At this point I don't have permission to the org experiencing the issue, and so was looking to understand the error message which reads System.test: line 32, column 17: Invalid type: Component.Apex.Page - Which I don't understand at all, these lines or code are not even used in my class. – VarunC Oct 15 '16 at 10:56
  • 1
    I would open a case with Salesforce support as this may not be something you can diagnose and fix yourself. See Compilation errors in the installed manager package which is the same error from a year ago with no resolution posted. Is your client seeing any errors? – Keith C Oct 15 '16 at 12:16
  • Hi @VarunC. I'm facing a very similar problem (the last line in my stack trace is equal to yours: System.test: line 32, column 17: Invalid type: Component.Apex.Page) and described it here: developer.salesforce.com/forums/?id=906F00000005HuaIAE. I still can't find a reason and good explanation for this. But, maybe, we'll find it together if we compare our situations. So, could you answer some questions posted below (I was not able to put them in 1 comment)? – Gennadiy Apr 8 '17 at 9:18
  • A trigger for what object do you use? My one is on ContentDocument and fires after update. – Gennadiy Apr 8 '17 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.