Search code examples
apache-flink

What's wrong with me to run the flink sample project(Frauddetection)?


I'm study apache-flink in it'stutorial,and i run it inside my IDEA,then a error occured like this: enter code here Error: A JNI error has occurred, please check your installation and try again enter code hereException in thread "main" java.lang.NoClassDefFoundError: enter code hereorg/apache/flink/streaming/api/functions/source/SourceFunction enter code hereat java.lang.Class.getDeclaredMethods0(Native Method) enter code hereat java.lang.Class.privateGetDeclaredMethods(Class.java:2701) enter code hereat java.lang.Class.privateGetMethodRecursive(Class.java:3048)e my jdk version is jdk1.8.0_291,jre version is jre1.8.0_331 is it related to this?


Solution

  • When you want to run a project like this one in IntelliJ, you will need to edit the run configuration to include this option:

    Add dependencies with "provided" scope to classpath