java.lang.ClassNotFoundException:org.apache.flink.connector.base.source.reader.RecordEmitter

问题描述 投票:0回答:1

我一直在尝试从 Apache flink 的字数统计文档中运行示例 Flink 作业,但现在已经收到此错误一段时间了,似乎是依赖问题,但尝试更改 POM 文件,仍然没有成功,下面是我的聚甲醛

<dependencies>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-core</artifactId>
            <version>1.20.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-streaming-java</artifactId>
            <version>1.20.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-walkthrough-common</artifactId>
            <version>1.20.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-clients</artifactId>
            <version>1.20.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-connector-kafka</artifactId>
            <version>3.3.0-1.20</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.33</version>
        </dependency>
        <!-- Custom JARs -->
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-connector-jdbc</artifactId>
            <version>3.2.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/lib/flink-connector-jdbc-3.2.0.jar</systemPath>
        </dependency>
    </dependencies>

我尝试更改 POM 文件并期望运行此代码,但没有得到任何结果

java maven apache-flink pom.xml flink-streaming
1个回答
0
投票

看起来您缺少 flink-connector-base 依赖项

<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-connector-base</artifactId>
    <version>1.20.0</version>
</dependency>
© www.soinside.com 2019 - 2024. All rights reserved.