java.lang.VerifyError: JVMVRFY007 final method overridden; class=net/sf/cglib/core/DebuggingClassWriter, method=visit(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V
further investigation led us to the incompatibility of CGLIB with the loaded ASM library (here org.objectweb.asm.ClassWriter class in particular) being the cause.
We pack the compatible ASM version 3.3.1 in our application, however WAS 8.5 seems to expose its own ASM which is of version 4.0 and that breaks our application:
class load: org.objectweb.asm.ClassWriter from: file:/opt/IBM/WebSphere/AppServer85/plugins/com.ibm.ws.prereq.ow.asm.jar class load: org.objectweb.asm.ClassWriter from: file:/opt/IBM/WebSphere/AppServer85/plugins/asm-all-4.0.jar
Also, another ASM related exception that we noticed comes from the Liferay Portal 6.1.0 CE application and it again doesn't occur at WAS 8.0:
Is this really intended behaviour to expose WAS packaged ASM classes to user applications?
For those potentially interested some possible workarounds:
- use cglib-nodep variant of CGLIB that doesn't depend on separate ASM library (this is what we use for now, but that doesn't apply the 2nd issue where CGLIB isn't involved)
- define isolated shared library for CGLIB and all used ASM libraries and reference it from your application (that's what we use for the 2nd issue affecting Liferay Portal application)
- use parent_last classloading order for your application