非常感谢,jdk 升到 1.8.0_111 解决了
-----邮件原件----- 发件人: [email protected] <[email protected]> 代表 Zili Chen 发送时间: Wednesday, September 11, 2019 10:35 AM 收件人: user-zh <[email protected]> 主题: Re: 编译flink 1.9 flink-table-api-java 编译不过 看起来是一个 JDK 的 bug https://stackoverflow.com/questions/25523375/java8-lambdas-and-exceptions 你可以升级 JDK 的小版本吗?我在 8.0.212 上没遇到这个问题。 Best, tison. venn <[email protected]> 于2019年9月11日周三 上午10:26写道: > 各位大佬,请教一下编译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/or > g/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 <args> -rf :flink-table-api-java > > > >
