Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-24427 Hide Scala in flink-table-planner from API
  3. FLINK-25487

Improve exception when flink-table-runtime is not in classpath

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.15.0
    • Table SQL / Planner
    • None

    Description

      If flink-table-runtime is not in the classpath, an exception can be quite cryptic.

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/calcite/shaded/com/jayway/jsonpath/spi/mapper/MappingProvider
      	at java.lang.Class.getDeclaredMethods0(Native Method)
      	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
      	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
      	at java.lang.Class.getMethod0(Class.java:3018)
      	at java.lang.Class.getMethod(Class.java:1784)
      	at org.apache.calcite.linq4j.tree.Types.lookupMethod(Types.java:314)
      	at org.apache.calcite.util.BuiltInMethod.<init>(BuiltInMethod.java:646)
      	at org.apache.calcite.util.BuiltInMethod.<clinit>(BuiltInMethod.java:345)
      	at org.apache.calcite.rel.metadata.RelMdPercentageOriginalRows.<clinit>(RelMdPercentageOriginalRows.java:41)
      	at org.apache.calcite.rel.metadata.DefaultRelMetadataProvider.<init>(DefaultRelMetadataProvider.java:42)
      	at org.apache.calcite.rel.metadata.DefaultRelMetadataProvider.<clinit>(DefaultRelMetadataProvider.java:28)
      	at org.apache.calcite.plan.RelOptCluster.<init>(RelOptCluster.java:91)
      	at org.apache.calcite.plan.RelOptCluster.create(RelOptCluster.java:100)
      	at org.apache.flink.table.planner.calcite.FlinkRelOptClusterFactory$.create(FlinkRelOptClusterFactory.scala:36)
      	at org.apache.flink.table.planner.calcite.FlinkRelOptClusterFactory.create(FlinkRelOptClusterFactory.scala)
      	at org.apache.flink.table.planner.delegation.PlannerContext.<init>(PlannerContext.java:137)
      	at org.apache.flink.table.planner.delegation.PlannerBase.<init>(PlannerBase.scala:113)
      	at org.apache.flink.table.planner.delegation.StreamPlanner.<init>(StreamPlanner.scala:55)
      	at org.apache.flink.table.planner.delegation.DefaultPlannerFactory.create(DefaultPlannerFactory.java:62)
      	at org.apache.flink.table.planner.loader.DelegatePlannerFactory.create(DelegatePlannerFactory.java:36)
      	at org.apache.flink.table.factories.PlannerFactoryUtil.createPlanner(PlannerFactoryUtil.java:53)
      	at org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:123)
      	at org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:128)
      	at org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:96)
      	at com.ververica.Example_04_Table_ETL.main(Example_04_Table_ETL.java:18)
      Caused by: java.lang.ClassNotFoundException: org.apache.flink.calcite.shaded.com.jayway.jsonpath.spi.mapper.MappingProvider
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
      	at org.apache.flink.core.classloading.ComponentClassLoader.loadClassFromOwnerOnly(ComponentClassLoader.java:139)
      	at org.apache.flink.core.classloading.ComponentClassLoader.loadClassFromComponentFirst(ComponentClassLoader.java:133)
      	at org.apache.flink.core.classloading.ComponentClassLoader.loadClass(ComponentClassLoader.java:95)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
      	... 25 more
      

      Attachments

        Activity

          People

            slinkydeveloper Francesco Guardiani
            twalthr Timo Walther
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: