迁移到dataflow 2.x后java.lang.NoClassDefFoundError:org / apache / beam / sdk / runners / PipelineRunner

时间:2022-05-09 14:38:56

Getting runtime error:

获取运行时错误:

"java.lang.NoClassDefFoundError: org/apache/beam/sdk/runners/PipelineRunner"

even though I have below in my pom.xml

即使我在我的pom.xml下面

<dependency>
        <groupId>com.google.cloud.dataflow</groupId>
        <artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
        <version>[2.1.0, 2.99)</version>
    </dependency>

All compile time errors have been resolved after moving to 2.X, started getting runtime error.

移动到2.X后,所有编译时错误都已解决,开始出现运行时错误。

mvn compile on this project also reports success. Just when I attempt to run the pipeline from eclipse get this error.

mvn编译这个项目也报告成功。就在我尝试从eclipse运行管道时出现此错误。

1 个解决方案

#1


2  

I added below to my pom.xml and deleted any all run profiles in pom.xml and error was resolved.

我在下面添加到我的pom.xml并删除了pom.xml中的所有运行配置文件,并且错误已解决。

<dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
      <version>[2.1.0, 2.99)</version>
    </dependency>

#1


2  

I added below to my pom.xml and deleted any all run profiles in pom.xml and error was resolved.

我在下面添加到我的pom.xml并删除了pom.xml中的所有运行配置文件,并且错误已解决。

<dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
      <version>[2.1.0, 2.99)</version>
    </dependency>