【Intellij idea】Exception in thread "main" java.lang.NoClassDefFoundError:

参考@街灯下的小草 的这篇文章解决这个问题https://blog.csdn.net/yhl_jxy/article/details/78872641 

使用IntelliJ IDEA启动Flink项目出现Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/streaming/api/functi......

pom.xml有引入flink-streaming包,可是鬼使神差地加了个<scope>provided</scope>...

去掉保平安!

像原博在Project Structure里修改成Compile也OK

至于什么时候使用provided,后续研究

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章