title: java.lang.ClassFormatError: Invalid method Code length 75567 in class file
body: <p>Greetings for the intelligent folks,</p>
  
  <p>I am using cobertura along with <strong>mockito</strong> &amp; <strong>powermocktio</strong> to get the code coverage.
  I have <strong>1.7</strong> <strong>java</strong> version in my machine installed.</p>
  
  <p>When I run the junit test cases in eclipse,all the test cases are getting passed.
  But when I run ,</p>
  
  <p><strong>mvn cobertura:cobertura</strong></p>
  
  <p>I am getting following error.</p>
  
  <blockquote>
    <p>java.lang.ClassFormatError: Invalid method Code length 75567 in class
    file</p>
  </blockquote>
  
  <p>I researched and came to know that this is because of the memory size allocated for a metod by JVM.</p>
  
  <p>My test class is  referring  a <strong>legacy</strong> class that has a static method which is very huge .<strong>I cannot go and touch the legacy or main class for refractoring because of so many impacts .</strong></p>
  
  <p>Any ideas to get rid of this exception without touching the main class would be appreciated.</p>
  
  <p>Thanks
  Pradeep</p>