Bug 46722 - problem using bcel in jdk15
Summary: problem using bcel in jdk15
Alias: None
Product: BCEL - Now in Jira
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: issues@commons.apache.org
Depends on:
Reported: 2009-02-17 09:22 UTC by psramkumar
Modified: 2010-01-10 12:50 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description psramkumar 2009-02-17 09:22:49 UTC
Hi ,
I am using Bcel to instrument java classes  of webapplications in JDK1.6 ,1.5 .We encountered ClassFormat exception for classes using Generics
which prevented application from loading.From https://issues.apache.org/bugzilla/show_bug.cgi?id=33549
I saw a workaround to delete "LocalVariableTypeTable".I followed that suggestion and loop through the attributes
and deleted attribute named "LocalVariableTypeTable".Still While loading application I get ClassFormatException.
Example code in which i delete attribute "LocalvariableTypeTable" jc is JavaClass Object
             Method[] ma = jc.getMethods();
           for(int i=0,x=ma.length;i<x;i++)
                MethodGen mg = new MethodGen(ma[i],cg.getClassName(),cg.getConstantPool());
                Attribute[] atts = mg.getCodeAttributes();
                for( int j=0; j<atts.length; j++ ) {
                  catch(Exception o1)
                  output.write("exception "+o1);   
       Also i get other error
       Caused by: java.lang.ClassFormatError: LVTT entry for 'patterns' in class file org/springframework/classname does not match any LVT entry
and application fails to load
Comment 1 psramkumar 2009-04-16 04:14:52 UTC
Any update on this .We require this problem Solved ASAP
Comment 2 Torsten Curdt 2010-01-10 12:50:46 UTC
Please re-test against trunk.