Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-9234

Commons Logging is missing from shaded Flink Table library

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.4.2
    • 1.4.3, 1.5.0
    • Table SQL / API
    • None
    • jdk1.8.0_172
      flink 1.4.2
      Mac High Sierra

    Description

      The flink-table shaded library seems to be missing some classes from org.apache.commons.logging that are required by org.apache.commons.configuration. Ran into the problem while using the external catalog support, on Flink 1.4.2.

      See attached a repro, which produces:

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/table/shaded/org/apache/commons/logging/Log
      	at org.apache.flink.table.catalog.ExternalTableSourceUtil$.parseScanPackagesFromConfigFile(ExternalTableSourceUtil.scala:153)
      	at org.apache.flink.table.catalog.ExternalTableSourceUtil$.<init>(ExternalTableSourceUtil.scala:55)
      	at org.apache.flink.table.catalog.ExternalTableSourceUtil$.<clinit>(ExternalTableSourceUtil.scala)
      	at org.apache.flink.table.catalog.ExternalCatalogSchema.getTable(ExternalCatalogSchema.scala:78)
      	at org.apache.calcite.jdbc.SimpleCalciteSchema.getImplicitTable(SimpleCalciteSchema.java:82)
      	at org.apache.calcite.jdbc.CalciteSchema.getTable(CalciteSchema.java:256)
      	at org.apache.calcite.jdbc.CalciteSchema$SchemaPlusImpl.getTable(CalciteSchema.java:561)
      	at org.apache.flink.table.api.TableEnvironment.scanInternal(TableEnvironment.scala:497)
      	at org.apache.flink.table.api.TableEnvironment.scan(TableEnvironment.scala:485)
      	at Repro$.main(repro.scala:17)
      	at Repro.main(repro.scala)
      

      Dependencies:

          compile 'org.slf4j:slf4j-api:1.7.25'
          compile 'org.slf4j:slf4j-log4j12:1.7.25'
          runtime 'log4j:log4j:1.2.17'
      
          compile 'org.apache.flink:flink-scala_2.11:1.4.2'
          compile 'org.apache.flink:flink-streaming-scala_2.11:1.4.2'
          compile 'org.apache.flink:flink-clients_2.11:1.4.2'
          compile 'org.apache.flink:flink-table_2.11:1.4.2'
      

      Attachments

        1. repro.scala
          1 kB
          Eron Wright

        Issue Links

          Activity

            People

              twalthr Timo Walther
              eronwright Eron Wright
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: