I've been using BCEL for a while, and I am still on an old release, even pre-5.1. Lately, I've been getting a lot of LVTT errors, and I have found the following BugZilla entry that apparently addresses the issue:
http://issues.apache.org/bugzilla/show_bug.cgi?id=39695 The patch for this bug appears to be on BCEL 5.2, so I went ahead and upgraded to BCEL 5.2, but unfortunately, when I go to apply the patch, it requires a lot more changes than what is listed in the patch. The patch calls for org.apache.bcel.classfile.LocalVariableTypeTable, but this class isn't part of the 5.2 release. I went ahead and pulled the SVN trunk. There, one can find org.apache.bcel.classfile.LocalVariableTypeTable, it's apparently based on LocalVariableTypeTable from AspectJ, since it has the CPL license header. I built from the trunk, but perhaps it's a bit naive on my part ot expect it to be stable since it's not near a release candidate. The first error I got was a full blown JVM crash on Tomcat 6 on JDK 1.5: # # An unexpected error has been detected by HotSpot Virtual Machine: # # Internal Error (4A41564123414C4C530E4350500013), pid=2508, tid=2468 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_02-b09 mixed mode) # An error report file with more information is saved as hs_err_pid2508.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # My BCEL processor seems to initialize fine via a java 5 agent, but it appears that the failure occurs as the first modified class is passed back to the JVM, but I am not sure because this seems like a pretty serious error. I should probably try to apply the patch listed in 39695, but then, what revision is that patch based on? Am I missing something obvious here? Is there a place that shows all the revisions that went into the trunk? It seems very difficult to track the changes made. I did a diff on trunk and the 5.2 download, there is a pretty big delta in between the two.