#120 ClassFormatError: Invalid length (to much instructions)

Version 2.1.0
closed
nobody
JaCoCo (32)
5
2012-10-10
2012-03-20
Anonymous
No

There were already two bug reports about this issue ==>
3487174
3486469
Both bug report were closed as "duplicated" but without a hint of the origin bug report.
I was not able to find the origin bug report or any hint in the help foum.

The error occurs after upgrade from 1.5.3 to 2.0.1.201112281951
and still occurs in version 2.1.0.201202261248

The error occurs only on classes from a lib of Cognos.

java.lang.ClassFormatError: Invalid method Code length 67507 in class file com/cognos/developer/schemas/bibus/_3/ReportServiceStub
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.cognos.developer.schemas.bibus._3.ReportService_ServiceLocator.getreportService(ReportService_ServiceLocator.java:43)

Discussion

1 2 > >> (Page 1 of 2)

  • Anonymous
    2012-03-20

    sorry, just saw that 3486469 is the origin BUG.
    There it was somethinh about JDO-Kodo that i dont use.

    regardless of that it seems to be an issue of eclemme beaceus
    wirh the old version 1.5.3 it works fine.

     
    Last edit: Anonymous 2013-11-20
  • Can you please attach the class file in question:

    com/cognos/developer/schemas/bibus/_3/ReportServiceStub.class

    Thanks,
    -marc

     
    • status: open --> pending
     

  • Anonymous
    2012-03-21

    • status: pending --> open
     

  • Anonymous
    2012-03-21

    File added, it is part of a ext lib.
    surprisingly it is Java 1.2 ==>
    ./ReportServiceStub.class: compiled Java class data, version 46.0 (Java 1.2)

     
  • This class contains a VERY big method with > 37,000 instructions. JaCoCo adds additional instructions for probes that will in summary exceed the maximum length given by the class file format.

    As a workaround you might exclude such generated classes from code coverage.

    We have to think about how to deal with such cases. I would recommend to automatically exclude such methods from instrumentation.

     

  • Anonymous
    2012-03-23

    The woraround works for me:

    In Eclipse ==> Windows ==> Preferences ==> Java ==> Code Coverage ==>
    Excludes: com.cognos.developer.schemas.bibus._3.ReportServiceStub

    The bug should stay open til a general solution was found.
    Feel free to decrease the priority.

     

  • Anonymous
    2012-03-23

    • summary: java.lang.ClassFormatError: Invalid length --> ClassFormatError: Invalid length (to much instructions)
     
    Last edit: Anonymous 2013-05-03
    • labels: 896512 --> JaCoCo
     
1 2 > >> (Page 1 of 2)