开发者社区 问答 正文

编译flink 1.9 flink-table-api-java 编译不过

各位大佬,请教一下编译Flink 1.9 的问题,编译 flink-table-api-java 的时候 只 要有 “.orElseThrow(() -> new ValidationException("Undefined function: " + lookupCall.getUnresolvedName()));” 就不能通过编译,jdk版本是 1.8.0_91,请 问各位大佬应该怎么处理。

报错如下:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project flink-table-api-java: Compilation failure

[ERROR] /home/venn/git/flink/flink-table/flink-table-api-java/src/main/java/org/apac he/flink/table/operations/utils/factories/CalculatedTableFactory.java:[90,53 ] unreported exception X; must be caught or declared to be thrown

[ERROR]

[ERROR] -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

[ERROR]

[ERROR] After correcting the problems, you can resume the build with the command

[ERROR] mvn -rf :flink-table-api-java*来自志愿者整理的flink邮件归档

展开
收起
毛毛虫雨 2021-12-08 11:08:21 543 分享 版权
1 条回答
写回答
取消 提交回答
  • 看起来是一个 JDK 的 bug https://stackoverflow.com/questions/25523375/java8-lambdas-and-exceptions

    你可以升级 JDK 的小版本吗?我在 8.0.212 上没遇到这个问题。*来自志愿者整理的flink邮件归档

    2021-12-08 19:28:52
    赞同 展开评论