neoXfire opened a new pull request #275:
URL: https://github.com/apache/flink-statefun/pull/275
I got this error on sample project with Flink embedded using
`org.apache.flink:statefun-flink-datastream:3.1.0` and
`org.apache.flink:flink-clients_2.12:1.14.0`
```
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/flink/shaded/guava18/com/google/common/base/Optional
at
org.apache.flink.statefun.flink.datastream.StatefulFunctionDataStreamBuilder.build(StatefulFunctionDataStreamBuilder.java:147)
at org.example.Main.main(Main.java:50)
Caused by: java.lang.ClassNotFoundException:
org.apache.flink.shaded.guava18.com.google.common.base.Optional
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 2 more
```
I bump flink-clients version down to
`org.apache.flink:flink-clients_2.12:1.13.2` and there is no error anymore.
I still think using the JDK `Optional` class is more straightforward and
less error-prone than importing the shaded Guava class.
So this is my small PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]