Menu

#27 cglib-nodep has an unresolvable call to Class.forName

v1.0 (example)
open
nobody
5
2015-03-04
2008-06-12
Anonymous
No

cglib-nodep inlines org.objectweb.asm in an attempt to make itself self contained. However, the class net.sf.cglib.core.DebuggingClassWriter calls Class.forName("org.objectweb.asm.util.TraceClassVisitor"). In the -nodep jar this is transformed into Class.forName("net.sf.cglib.asm.util.TraceClassVisitor").
Since the asm-util jar which contains the org.objectweb.asm.util package isn't inlined along with the asm jar, this lookup, which works in vanilla cglib so long as asm-utils is available, can never work in the -nodep packaging variant. This isn't that big of a deal because it's only for debugging and the exception is caught and ignored when the lookup fails, but the unresolvable class spooks some OSGi implementations. A simple fix would be to inline asm-utils.jar as well as asm.jar.

Tony.
sweeney(at)addr.com

Discussion