环境信息:
jdk:8
mvel2:2.0.19
异常信息:
java.lang.VerifyError: (class: ASMAccessorImpl_3009129941634644382940, method: getKnownEgressType signature: ()Ljava/lang/Class;) Illegal type in constant pool
调用的方法是org.mvel2.MVEL类的以下方法:
public static Object executeExpression(Object compiledExpression, Object ctx, Map vars)
完整信息:
java.lang.VerifyError: (class: ASMAccessorImpl_3009129941634644382940, method: getKnownEgressType signature: ()Ljava/lang/Class;) Illegal type in constant pool
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer._initializeAccessor(ASMAccessorOptimizer.java:698)
at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:832)
at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:239)
at org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42)
at org.mvel2.MVEL.executeExpression(MVEL.java:996)
ASMAccessorOptimizer的部分源码:
可以看出mvel2的这个版本不支持jdk7和jdk8,升级下版本就好了
参考:
低版本mvel在MaxCompute jdk8环境中报java.lang.VerifyError_bengsa2291的博客-CSDN博客