Hi  Sharil,

I've tried your suggestion, but unfortunately it does not work, same exception.

Any other ideas ?


Thanks,

Leo


在 2023/5/15 20:15, Sharil Shafie 写道:
Hi,

May be you could try table planner loader instead.

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner-loader</artifactId>
    <version>1.16.0</version>
    <scope>provided</scope>
</dependency>

Regards.


On Mon, 15 May 2023, 18:54 krislee, <kris...@163.com> wrote:

    Hi  ALL,

    OS:   CentOS 7.9

    Flink version:  1.16.0


    It looks like  I'm hitting a  notorious exception which had been
    discoverd since earlier fink version. The issue was triggered

    when below java code executed:

        StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);

    More detailed trace is as below :

    Exception in thread "main" org.apache.flink.table.api.TableException: Could 
not instantiate the executor. Make sure a planner module is on the classpath
        at 
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:109)
        at 
org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:101)
        at 
org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:122)
        at 
org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:94)
        at 
com.sugon.cloud.paas.flink.cdc.FlinkCDC_mysql2doris_example.main(FlinkCDC_mysql2doris_example.java:63)

    Caused by: org.apache.flink.table.api.ValidationException: Could not find 
any factories that implement 
'org.apache.flink.table.delegation.ExecutorFactory' in the classpath.
        at 
org.apache.flink.table.factories.FactoryUtil.discoverFactory(FactoryUtil.java:533)
        at 
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:106)
        ... 4 more



    What I've done:
    1) Added missed dependencies in "pom.xml",  for example:

    <dependency>

         <groupId>org.apache.flink</groupId>

         <artifactId>flink-table-api-java-uber</artifactId>

         <version>1.16.1</version>

         <scope>provided</scope>

    </dependency>


    <dependency>

        <!-- this is needed to use the Table API from unit tests -->

        <groupId>org.apache.flink</groupId>

        <artifactId>flink-table-planner_${scala.binary.version}</artifactId>

        <version>${flink.version}</version>

        <scope>provided</scope>

    </dependency>


    2)Tried two methods to run application, got same error(see above)
mvn exec:java -Dexec.mainClass="xxx"

        java -jar target/xxx.jar


        I'm confused by the error because all necessary jar files does exist in 
Maven's local repository
    or FLINK_HOME's lib dir.


    The completed "pom.xml" is included in attachment.


    Thanks,
    Leo



Reply via email to