Giter Club home page Giter Club logo

examples's Introduction

Examples website for Stream Processing with Apache Flink

examples's People

Contributors

fhueske avatar vasia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

examples's Issues

No class found when running main function in Intellij

I tried to run the chapter 1 main function in IntelliJ, and got this error. Not sure how to debug it.
But I can find the function in the dependency folder.

image

Jdk: 1.8
The full error log.

"/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home/bin/java" "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=54296:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Users/xiangl/flink-learn/examples-java/target/classes:/Users/xiangl/.m2/repository/org/slf4j/slf4j-api/1.7.15/slf4j-api-1.7.15.jar:/Users/xiangl/.m2/repository/org/apache/flink/force-shading/1.7.1/force-shading-1.7.1.jar:/Users/xiangl/.m2/repository/org/apache/flink/flink-shaded-guava/18.0-5.0/flink-shaded-guava-18.0-5.0.jar:/Users/xiangl/.m2/repository/org/apache/flink/flink-shaded-netty/4.1.24.Final-5.0/flink-shaded-netty-4.1.24.Final-5.0.jar:/Users/xiangl/.m2/repository/org/apache/flink/flink-queryable-state-runtime_2.12/1.7.1/flink-queryable-state-runtime_2.12-1.7.1.jar:/Users/xiangl/.m2/repository/org/apache/flink/flink-queryable-state-client-java_2.12/1.7.1/flink-queryable-state-client-java_2.12-1.7.1.jar:/Users/xiangl/.m2/repository/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.jar:/Users/xiangl/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar io.github.streamingwithflink.chapter1.AverageSensorReadings
Error: Unable to initialize main class io.github.streamingwithflink.chapter1.AverageSensorReadings
Caused by: java.lang.NoClassDefFoundError: org/apache/flink/streaming/api/functions/source/SourceFunction

Missing Scala Classpath

Running the examples from the GitHub repo from Flink 1.7.1 results in the following error:

Starting execution of program
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: scala/runtime/java8/JFunction1$mcVI$sp
	at io.github.streamingwithflink.chapter1.AverageSensorReadings$$anon$5.createSerializer(AverageSensorReadings.scala:50)
	at org.apache.flink.streaming.api.datastream.WindowedStream.apply(WindowedStream.java:1108)
	at org.apache.flink.streaming.api.datastream.WindowedStream.apply(WindowedStream.java:1040)
	at org.apache.flink.streaming.api.scala.WindowedStream.apply(WindowedStream.scala:582)
	at io.github.streamingwithflink.chapter1.AverageSensorReadings$.main(AverageSensorReadings.scala:57)
	at io.github.streamingwithflink.chapter1.AverageSensorReadings.main(AverageSensorReadings.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:529)
	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:421)
	at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:427)
	at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:813)
	at org.apache.flink.client.cli.CliFrontend.runProgram(CliFrontend.java:287)
	at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:213)
	at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:1050)
	at org.apache.flink.client.cli.CliFrontend.lambda$main$11(CliFrontend.java:1126)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1754)
	at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
	at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1126)
Caused by: java.lang.NoClassDefFoundError: scala/runtime/java8/JFunction1$mcVI$sp
	... 23 more
Caused by: java.lang.ClassNotFoundException: scala.runtime.java8.JFunction1$mcVI$sp
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 23 more

I've tried re-running it but adding the --classpath argument but it still doesn't work.

./bin/flink run --classpath "file:///opt/dev/learn/scala-2.11.12/lib/scala-library.jar" -c io.github.streamingwithflink.chapter1.AverageSensorReadings examples-scala.jar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.