Unable to execute CEP pattern in Flink dashboard version 1.3.2 which is caused by ClassNotFoundException

泪湿孤枕 提交于 2019-12-02 10:30:52

After a whole day of my effort to solve this problem, finally, I got the solution. The problem was pretty basic, which is that Flink CEP is not a part of the binary distribution, so whenever I tried to execute pattern it gave me an error.

Solution is simple

As you can see Flink Binary does not have the cep jar.

so go to your IDE which is IntelliJ in my case and copy the required jar

Go to this location and copy paste this jar to lib folder in your binary version.

Yalaa, problem solved

If you dont want to add dependencies manually or you have a maven or sbt project, you can simply add the dependency in the .pom file or corresponding sbt file and add the following dependencies.

Change the flink version according to your project needs.

<!-- https://mvnrepository.com/artifact/org.apache.flink/flink-cep_2.11 -->
<dependency>
  <groupId>org.apache.flink</groupId>
  <artifactId>flink-cep_2.11</artifactId>
  <version>1.3.2</version>
</dependency>


// https://mvnrepository.com/artifact/org.apache.flink/flink-cep_2.11
libraryDependencies += "org.apache.flink" % "flink-cep_2.11" % "1.3.2"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!