[jira] [Created] (FLINK-19820) TableEnvironment init fails with JDK9

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-19820) TableEnvironment init fails with JDK9

Shang Yuanchun (Jira)
Timo Walther created FLINK-19820:
------------------------------------

             Summary: TableEnvironment init fails with JDK9
                 Key: FLINK-19820
                 URL: https://issues.apache.org/jira/browse/FLINK-19820
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / API
            Reporter: Timo Walther


I haven't verified the issue myself. But it seems that TableEnvironment cannot be properly initialized when using JDK9:

Stack trace:
{code}
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.flink.table.planner.calcite.FlinkRelFactories$.<init>(FlinkRelFactories.scala:51)
        at org.apache.flink.table.planner.calcite.FlinkRelFactories$.<clinit>(FlinkRelFactories.scala)
        at org.apache.flink.table.planner.calcite.FlinkRelFactories.FLINK_REL_BUILDER(FlinkRelFactories.scala)
        at org.apache.flink.table.planner.delegation.PlannerContext.lambda$getSqlToRelConverterConfig$2(PlannerContext.java:279)
        at java.util.Optional.orElseGet(java.base@9-internal/Optional.java:344)
        at org.apache.flink.table.planner.delegation.PlannerContext.getSqlToRelConverterConfig(PlannerContext.java:273)
        at org.apache.flink.table.planner.delegation.PlannerContext.createFrameworkConfig(PlannerContext.java:137)
        at org.apache.flink.table.planner.delegation.PlannerContext.<init>(PlannerContext.java:113)
        at org.apache.flink.table.planner.delegation.PlannerBase.<init>(PlannerBase.scala:112)
        at org.apache.flink.table.planner.delegation.StreamPlanner.<init>(StreamPlanner.scala:48)
        at org.apache.flink.table.planner.delegation.BlinkPlannerFactory.create(BlinkPlannerFactory.java:50)
        at org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:130)
        at org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:111)
        at org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:82)
        at com.teavaro.cep.modules.ml.CEPMLInit.runUseCase(CEPMLInit.java:57)
        at com.teavaro.cep.modules.ml.CEPMLInit.start(CEPMLInit.java:43)
        at com.teavaro.cep.modules.ml.CEPMLInit.prepareUseCase(CEPMLInit.java:35)
        at com.teavaro.cep.pipelines.CEPInit.start(CEPInit.java:47)
        at com.teavaro.cep.StreamingJob.runCEP(StreamingJob.java:121)
        at com.teavaro.cep.StreamingJob.prepareJob(StreamingJob.java:106)
        at com.teavaro.cep.StreamingJob.main(StreamingJob.java:64)
Caused by: java.lang.RuntimeException: while binding method public default org.apache.calcite.tools.RelBuilder$ConfigBuilder org.apache.calcite.tools.RelBuilder$Config.toBuilder()
        at org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:215)
        at org.apache.calcite.tools.RelBuilder$Config.<clinit>(RelBuilder.java:3074)
        ... 21 more
Caused by: java.lang.IllegalAccessException: access to public member failed: org.apache.calcite.tools.RelBuilder$Config.toBuilder()ConfigBuilder/invokeSpecial, from org.apache.calcite.tools.RelBuilder$Config/2 (unnamed module @2cc03cd1)
        at java.lang.invoke.MemberName.makeAccessException(java.base@9-internal/MemberName.java:908)
        at java.lang.invoke.MethodHandles$Lookup.checkAccess(java.base@9-internal/MethodHandles.java:1839)
        at java.lang.invoke.MethodHandles$Lookup.checkMethod(java.base@9-internal/MethodHandles.java:1779)
        at java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(java.base@9-internal/MethodHandles.java:1928)
        at java.lang.invoke.MethodHandles$Lookup.getDirectMethodNoSecurityManager(java.base@9-internal/MethodHandles.java:1922)
        at java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(java.base@9-internal/MethodHandles.java:1480)
        at org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:213)

{code}

This might be fixed in later JDK versions but we should track the issue nevertheless. The full discussion can be found here:

https://stackoverflow.com/questions/64544422/illegal-access-to-create-streamtableenvironment-with-jdk-9-in-debian



--
This message was sent by Atlassian Jira
(v8.3.4#803005)