错误:

org.codehaus.janino.CompilerFactory cannot be cast to org.codehaus.commons.compiler.ICompilerFactory

问题是在Flink SQL Client中碰到的

Flink SQL> select * from orders;
[ERROR] Could not execute SQL statement. Reason:
java.lang.ClassCastException: org.codehaus.janino.CompilerFactory cannot be cast to org.codehaus.commons.compiler.ICompilerFactory

 

解决:

对于Flink SQL Client而言,

$FLINK_HOME/conf/flink-conf.yaml中

classloader.resolve-order: parent-first