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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0, 1.1.4
    • Component/s: Table API & SQL
    • Labels:
      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
      

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user twalthr opened a pull request:

          https://github.com/apache/flink/pull/2506

          FLINK-4581 [table] Table API throws "No suitable driver found for jdbc:calcite"

          Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
          If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).
          In addition to going through the list, please provide a meaningful description of your changes.

          • [x] General
          • The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
          • The pull request addresses only one issue
          • Each commit in the PR has a meaningful commit message (including the JIRA id)
          • [x] Documentation
          • Documentation has been added for new functionality
          • Old documentation affected by the pull request has been updated
          • JavaDoc for public methods has been added
          • [x] Tests & Build
          • Functionality added by the pull request is covered by tests
          • `mvn clean verify` has been executed successfully locally or a Travis build has passed

          This PR simplifies the planner creation. A dummy JDBC connection which also caused problems for a user is not necessary anymore.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/twalthr/flink FLINK-4581

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/2506.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #2506


          commit d3b0a7a0209526ece85bd27618a6400829b253d0
          Author: twalthr <twalthr@apache.org>
          Date: 2016-09-16T09:41:15Z

          FLINK-4581 [table] Table API throws "No suitable driver found for jdbc:calcite"


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user twalthr opened a pull request: https://github.com/apache/flink/pull/2506 FLINK-4581 [table] Table API throws "No suitable driver found for jdbc:calcite" Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration. If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide] ( http://flink.apache.org/how-to-contribute.html ). In addition to going through the list, please provide a meaningful description of your changes. [x] General The pull request references the related JIRA issue (" [FLINK-XXX] Jira title text") The pull request addresses only one issue Each commit in the PR has a meaningful commit message (including the JIRA id) [x] Documentation Documentation has been added for new functionality Old documentation affected by the pull request has been updated JavaDoc for public methods has been added [x] Tests & Build Functionality added by the pull request is covered by tests `mvn clean verify` has been executed successfully locally or a Travis build has passed This PR simplifies the planner creation. A dummy JDBC connection which also caused problems for a user is not necessary anymore. You can merge this pull request into a Git repository by running: $ git pull https://github.com/twalthr/flink FLINK-4581 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2506.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2506 commit d3b0a7a0209526ece85bd27618a6400829b253d0 Author: twalthr <twalthr@apache.org> Date: 2016-09-16T09:41:15Z FLINK-4581 [table] Table API throws "No suitable driver found for jdbc:calcite"
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user fhueske commented on the issue:

          https://github.com/apache/flink/pull/2506

          +1 to merge

          Show
          githubbot ASF GitHub Bot added a comment - Github user fhueske commented on the issue: https://github.com/apache/flink/pull/2506 +1 to merge
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user fhueske commented on the issue:

          https://github.com/apache/flink/pull/2506

          Merging

          Show
          githubbot ASF GitHub Bot added a comment - Github user fhueske commented on the issue: https://github.com/apache/flink/pull/2506 Merging
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/2506

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/2506
          Hide
          fhueske Fabian Hueske added a comment -

          Fixed for 1.1.4 with 5731672e5f7134d1a9ab01e38b7a861d1ebf0a68
          Fixed for 1.2.0 with f0e451ae3cbfe40926d08ffaf04cdff58136b306

          Show
          fhueske Fabian Hueske added a comment - Fixed for 1.1.4 with 5731672e5f7134d1a9ab01e38b7a861d1ebf0a68 Fixed for 1.2.0 with f0e451ae3cbfe40926d08ffaf04cdff58136b306

            People

            • Assignee:
              twalthr Timo Walther
              Reporter:
              twalthr Timo Walther
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development