Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20873 Upgrade Calcite version to 1.27
  3. FLINK-29202

CliClient fails with NPE during start (after calcite update to 1.27)

    XMLWordPrintableJSON

Details

    • Solved by inclusion org.checkerframework:checker-qual to shade plugin artifact set

    Description

      After update to calcite 1.27 sqlclient fails with

      Exception in thread "main" org.apache.flink.table.client.SqlClientException: Unexpected exception. This is a bug. Please consider filing an issue.
      	at org.apache.flink.table.client.SqlClient.startClient(SqlClient.java:201)
      	at org.apache.flink.table.client.SqlClient.main(SqlClient.java:161)
      Caused by: java.lang.ExceptionInInitializerError
      	at org.apache.calcite.tools.Frameworks$ConfigBuilder.<init>(Frameworks.java:241)
      	at org.apache.calcite.tools.Frameworks$ConfigBuilder.<init>(Frameworks.java:217)
      	at org.apache.calcite.tools.Frameworks.newConfigBuilder(Frameworks.java:201)
      	at org.apache.flink.table.planner.delegation.PlannerContext.createFrameworkConfig(PlannerContext.java:140)
      	at org.apache.flink.table.planner.delegation.PlannerContext.<init>(PlannerContext.java:124)
      	at org.apache.flink.table.planner.delegation.PlannerBase.<init>(PlannerBase.scala:121)
      	at org.apache.flink.table.planner.delegation.StreamPlanner.<init>(StreamPlanner.scala:65)
      	at org.apache.flink.table.planner.delegation.DefaultPlannerFactory.create(DefaultPlannerFactory.java:65)
      	at org.apache.flink.table.factories.PlannerFactoryUtil.createPlanner(PlannerFactoryUtil.java:58)
      	at org.apache.flink.table.client.gateway.context.ExecutionContext.createStreamTableEnvironment(ExecutionContext.java:130)
      	at org.apache.flink.table.client.gateway.context.ExecutionContext.createTableEnvironment(ExecutionContext.java:104)
      	at org.apache.flink.table.client.gateway.context.ExecutionContext.<init>(ExecutionContext.java:66)
      	at org.apache.flink.table.client.gateway.context.SessionContext.create(SessionContext.java:229)
      	at org.apache.flink.table.client.gateway.local.LocalContextUtils.buildSessionContext(LocalContextUtils.java:87)
      	at org.apache.flink.table.client.gateway.local.LocalExecutor.openSession(LocalExecutor.java:87)
      	at org.apache.flink.table.client.SqlClient.start(SqlClient.java:88)
      	at org.apache.flink.table.client.SqlClient.startClient(SqlClient.java:187)
      	... 1 more
      Caused by: java.lang.NullPointerException
      	at sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
      	at sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.<init>(AnnotatedTypeFactory.java:139)
      	at sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
      	at sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
      	at java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:640)
      	at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
      	at org.apache.calcite.util.ImmutableBeans.makeDef(ImmutableBeans.java:146)
      	at org.apache.calcite.util.ImmutableBeans.access$000(ImmutableBeans.java:55)
      	at org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:68)
      	at org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:65)
      	at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
      	at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
      	at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
      	at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
      	at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache.get(LocalCache.java:3951)
      	at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
      	at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
      	at org.apache.calcite.util.ImmutableBeans.create_(ImmutableBeans.java:95)
      	at org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:76)
      	at org.apache.calcite.sql.validate.SqlValidator$Config.<clinit>(SqlValidator.java:792)
      	... 18 more
      
      Process finished with exit code 1
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            Sergey Nuyanzin Sergey Nuyanzin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: