https://issues.apache.org/bugzilla/show_bug.cgi?id=50443
Summary: LVTT entry for 'ht' does not match any LVT entry
Product: BCEL
Version: 5.2
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: Main
AssignedTo: [email protected]
ReportedBy: [email protected]
I used the BCEL v5.2 to do experiments on my test cases, and met the following
problem.
D:\java test._Test10
Exception in thread "main" java.lang.ClassFormatError: LVTT entry for 'ht' in
cl
ass file test/_Test10 does not match any LVT entry
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
1)
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: test._Test10. Program will exit.
My test case is as follows:
public class _Test10 {
public static void main (String [] args){
HashMap <Double,Integer> ht = new HashMap<Double,Integer>();
}
}
Using BCEL, I didn't make any change of the original Method. Using it, I
generated a new Method and replaced it with the new one.
ClassGen _cg = new ClassGen(_claz);
for (Method oldMethod : _inMethods) {
MethodGen mg = new MethodGen(oldMethod, _inClass.getClassName(), _cpg);
Method newMethod = mg.getMethod();
_cg.replaceMethod(oldMethod, newMethod);
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]