Can anybody let me know when/why I get this error:

Compile Error: Class compilation requires too much metadata. Please consider splitting this class into multiple classes

  • 2
    There should be a badge for reaching this limit :) I'm wondering how many lines of code you have ;)
    – Basti
    Oct 11, 2017 at 14:41

1 Answer 1


You can write only 1 million character per class and your class character count is greater then this so you need to break it into multiple sub classes.

enter image description here

Size-Specific Apex Limits

  • I just checked the number of characters. It is 17k char. Oct 12, 2017 at 8:13
  • @AmitVisapurkar check for method size and complete org code coverage. Oct 12, 2017 at 8:28

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.