I'm trying to create a cep program that is able to detect when a user's salary change.so i wrote this code
Pattern
.<comptedata>begin("First Event").subtype(comptedata.class).where(
new SimpleCondition<comptedata>() {
@Override
public boolean filter(comptedata event) throws Exception {
if (event.getoperation()!="virement"){
return false ;
}
return event.getMontantop() != event.getsalaire();
}
})
.followedBy("seconf Event").subtype(comptedata.class).where(
new SimpleCondition<comptedata>() {
@Override
public boolean filter(comptedata event) throws Exception {
if (event.getoperation()!="virement"){
return false ;
}
return event.getMontantop() != event.getsalaire();
}
});
but it gives me this error
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/api/common/ExecutionConfig$ClosureCleanerLevel
at org.apache.flink.cep.pattern.Pattern.where(Pattern.java:159)
at myflink.cep.changePattern.getEventPattern(changePattern.java:19)
at myflink.app.toWarningStream(app.java:69)
at myflink.app.main(app.java:52)
Caused by: java.lang.ClassNotFoundException: org.apache.flink.api.common.ExecutionConfig$ClosureCleanerLevel
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
I understood from this question (Why am I getting a NoClassDefFoundError in Java?) that there is a class file that my code depends on and it is present at compile time but not found at runtime, however flink-core already exists in my project structer i tried to make it at runtime instead of compile but It doesn't solve the problem I don't know what should I do