Max Breuer
02/06/2024, 10:41 PMStreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
StreamTableEnvironment tEnv = StreamTableEnvironment.create(env); // <- exception here
Exception:
Exception in thread "main" org.apache.flink.table.api.TableException: Could not instantiate the executor. Make sure a planner module is on the classpath
Dependencies (among others):
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner-blink_2.11</artifactId>
<version>1.13.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-scala_2.11</artifactId>
<version>1.13.6</version>
<scope>provided</scope>
</dependency>
I run flink within intellij and have "add dependencies with provided to classpath" activated. According to Stackoverflow and other resources, this should be sufficient. I checked the dependencies in intellij and the planner-blink is present.
Has someone an idea why it still crashes?Martijn Visser
02/07/2024, 7:07 AMMax Breuer
02/07/2024, 10:08 AMflink-table-planner also installs the flink-scala as implicit dependency, so my second dependency from above was redundant.
I changed my dependencies to just:
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner_2.12</artifactId>
<version>1.18.1</version>
<scope>provided</scope>
</dependency>
However, this still didn't fix it.
What fixed it in the end for me was to have only the named dependency, delete all run configurations in intellij, invalidate the caches, restart, reinstall maven dependencies and reconfigure the run configuration from scratch. So this problem is solved✅Martijn Visser
02/07/2024, 11:28 AM