标签:pen src bin lan idea tar exception except artifact
创建完成Flink QuickStart 项目后,如果直接导入IDEA中运行或调试会报出如下错误
Caused by: java.lang.ClassNotFoundException: org.apache.flink.streaming.api.datastream.DataStream
这是由于quickstart模板中Flink依赖的scope默认为provided, 因此IDEA不会加载这些依赖。
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
解决方法:
修改Run/Debug Configurations,勾选Include dependencies with "provided" scope
标签:pen src bin lan idea tar exception except artifact
原文地址:https://www.cnblogs.com/yanyan45/p/12690203.html