在运行Flex模板NoclassDeffoundError时:org/apache/beam/sdk/transforms/dofn

发布于 2025-02-13 23:26:45 字数 354 浏览 0 评论 0原文

我正在数据流中运行GCP Flex模板。

从模板开始工作时,我会得到以下例外:

Error: Unable to initialize main class. 
com.mycompany.pubsubdfjobs.protocol1_0.PubSubRedis

由:java.lang.noclassdeffounderror:org/apache/beam/beam/sdk/transforms/dofn

dofn在项目中的许多类中使用。我可以在本地运行代码。所有依赖项都在我的gradle.build文件中。 gradle.build文件被复制到DokerFile中,用于模板。 有什么问题?

I am running gcp flex templates in dataflow.

While starting a job from a template I am getting this exception:

Error: Unable to initialize main class. 
com.mycompany.pubsubdfjobs.protocol1_0.PubSubRedis

Caused by: java.lang.NoClassDefFoundError: org/apache/beam/sdk/transforms/DoFn

DoFn is used in a lot of classes in the Project. I am able to run the code locally. All dependencies are in my gradle.build file. The gradle.build file is copied to the Dokerfile the is used for the template.
What could be the issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甩你一脸翔 2025-02-20 23:26:45

错误指出您的jar无法找到项目的主类。该类应根据 documentation,应根据pom.xml文件在您的pom.xml文件上指定。 。该文件需要与文档中列出的样本具有相同的结构。您可以确保插件pom.xml文件上标记文件与文档中的文件匹配。

The error states that your JAR is not able to find the main class for your project. This class should be specified on your pom.xml file according to the documentation. This file needs to have the same structure as the sample presented in the documentation. You can make sure that the plugin tag on your pom.xml file matches the one found in the documentation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文