在运行Flex模板NoclassDeffoundError时:org/apache/beam/sdk/transforms/dofn
我正在数据流中运行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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
错误指出您的
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 theplugin
tag on yourpom.xml
file matches the one found in the documentation.