Flink Table API SQL Could not find any factories that implement ‘org.apache.flink.table.delegation.E

报错信息
Exception in thread “main” 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:534)
at org.apache.flink.table.api.internal.TableEnvironmentImpl.create(TableEnvironmentImpl.java:278)
at org.apache.flink.table.api.TableEnvironment.create(TableEnvironment.java:93)
at com.dadao.flinktodoris.GoodsDataPipelineLocal.main(GoodsDataPipelineLocal.java:12)

  1. 提交jar包到flink报错 修改pom插件
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <createDependencyReducedPom>false</createDependencyReducedPom>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                            <configuration>
                                <filters>
                                    <filter>
                                        <!-- Do not copy the signatures in the META-INF folder. Otherwise,
                                            this might cause SecurityExceptions when using the JAR. -->
                                        <artifact>*:*</artifact>
                                        <excludes>
                                            <exclude>META-INF/*.SF</exclude>
                                            <exclude>META-INF/*.DSA</exclude>
                                            <exclude>META-INF/*.RSA</exclude>
                                        </excludes>
                                    </filter>
                                </filters>
                                <!--                            合并多个connetor 的META-INF.services 文件-->
    <!--                            <transformers>-->
    <!--                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">-->
    <!--                                    <resource>reference.conf</resource>-->
    <!--                                </transformer>-->
    <!--                                &lt;!&ndash; The service transformer is needed to merge META-INF/services files &ndash;&gt;-->
    <!--                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>-->
    <!--                                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">-->
    <!--                                    <projectName>Apache Flink</projectName>-->
    <!--                                    <encoding>UTF-8</encoding>-->
    <!--                                </transformer>-->
    <!--                            </transformers>-->
                                <transformers>
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                        <mainClass>com.dadao.flinktodoris.GoodsDataPipelineLocal</mainClass>
                                    </transformer>
                                </transformers>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>8</source>
                        <target>8</target>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    
    
  2. 运行报错 增加相关依赖
            <!-- https://mvnrepository.com/artifact/org.apache.flink/flink-table-api-java -->
            <dependency>
                <groupId>org.apache.flink</groupId>
                <artifactId>flink-table-api-java</artifactId>
                <version>1.16.3</version>
            </dependency>
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值