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

Table API throws "No suitable driver found for jdbc:calcite"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.4, 1.2.0
    • Table SQL / API
    • None

    Description

      It seems that in certain cases the internal Calcite JDBC driver cannot be found. We should either try to get rid of the entire JDBC invocation or fix this bug.

      From ML: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Stream-sql-query-in-Flink-tp8928.html

      org.apache.flink.client.program.ProgramInvocationException: The main method
      caused an error.
      	at
      org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:524)
      	at
      org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:403)
      	at
      org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:331)
      	at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:777)
      	at org.apache.flink.client.CliFrontend.run(CliFrontend.java:253)
      	at
      org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1005)
      	at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1048)
      Caused by: java.lang.RuntimeException: java.sql.SQLException: No suitable
      driver found for jdbc:calcite:
      	at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:151)
      	at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:106)
      	at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:127)
      	at
      org.apache.flink.api.table.FlinkRelBuilder$.create(FlinkRelBuilder.scala:56)
      	at
      org.apache.flink.api.table.TableEnvironment.<init>(TableEnvironment.scala:73)
      	at
      org.apache.flink.api.table.StreamTableEnvironment.<init>(StreamTableEnvironment.scala:58)
      	at
      org.apache.flink.api.java.table.StreamTableEnvironment.<init>(StreamTableEnvironment.scala:45)
      	at
      org.apache.flink.api.table.TableEnvironment$.getTableEnvironment(TableEnvironment.scala:376)
      	at
      org.apache.flink.api.table.TableEnvironment.getTableEnvironment(TableEnvironment.scala)
      	at org.myorg.quickstart.ReadingFromKafka2.main(ReadingFromKafka2.java:48)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at
      org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:509)
      	... 6 more
      Caused by: java.sql.SQLException: No suitable driver found for jdbc:calcite:
      	at java.sql.DriverManager.getConnection(DriverManager.java:689)
      	at java.sql.DriverManager.getConnection(DriverManager.java:208)
      	at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:144)
      	... 20 more
      

      Attachments

        Issue Links

          Activity

            People

              twalthr Timo Walther
              twalthr Timo Walther
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: