我有一个流式表API查询,并希望使用Table
方法将生成的.csv
写入table.writetoSink(sink)
文件。
当我运行程序时,我收到以下错误。
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/commons/compiler/CompileException
at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:580)
at org.apache.flink.api.table.FlinkPlannerImpl.rel(FlinkPlannerImpl.scala:102)
at org.apache.flink.api.table.BatchTableEnvironment.sql(BatchTableEnvironment.scala:132)
at table_streaming_test.main(table_streaming_test.java:59)
Caused by: java.lang.ClassNotFoundException: org.codehaus.commons.compiler.CompileException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more
我还在项目中包含了commons-compiler.jar文件。