问题
I am getting the following exception when running swagger2. I read online that this is usually due to referencing multiple different versions of the same jar. However, I only found one version of org.ow2.asm:asm:5.0.3 in my gradle jar folder. I also ran gradlew dependencies and found there is only one version of org.ow2.asm:asm: referenced.
What else could cause this error?
java.lang.IncompatibleClassChangeError: class org.objectweb.asm.tree.ClassNode has interface org.objectweb.asm.ClassVisitor as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
回答1:
I found my problem. I actually had a libs folder that had another version of asm*..., damn it :-)!
It is working now. Thanks!
来源:https://stackoverflow.com/questions/52936381/java-lang-incompatibleclasschangeerror-class-org-objectweb-asm-tree-classnode-h