flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Ewen <se...@apache.org>
Subject Re: Eclipse issue after latest dependency rework pr
Date Tue, 30 Sep 2014 21:12:13 GMT
Yes, I wanted to write a few pointers about such issues.

We recently shaded the guava dependency, meaning that we have a custom
version of guava where all classes reside in
"org.apache.flink.shaded.com.google" and maven rewrites all our guava
references to that namespace.

The reason is that guava is a frequently used library and versions are not
all compatible. For example, hadoop 2.5 uses guava 11 and fails if we bring
guava 17 into the classpath. The shading causes our guava version to not
conflict, because our shaded version's classes reside different namespace.

Since Eclipse does not interpret the shading (it only happens in the maven
package phase) you need a regular dependency to guava that is not exported
("provided" scope)

Try adding this to the project's pom, it will tell maven to compile and
individually run with the guava lib, but not package it.


On Tue, Sep 30, 2014 at 11:02 PM, Gyula Fóra <gyfora@apache.org> wrote:

> Hey,
> We have pulled the dependency rework from the apache master and now we
> cannot get our tests to run in eclipse. With maven from the command line
> and also with travis it works perfectly but when I try to run tests that
> access the the Configuration class we get the following exception:
> java.lang.NoClassDefFoundError: com/google/common/io/BaseEncoding
> at
> org.apache.flink.configuration.Configuration.setBytes(Configuration.java:358)
> at
> .....
> some stuff here
> .....
> Caused by: java.lang.ClassNotFoundException:
> com.google.common.io.BaseEncoding
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> ... 32 more
> I literally tried everything to make it work, deleted all maven files,
> reinstalled eclipse etc, but still no luck. Do you experience the same
> issue when running the streaming-core tests in eclipse?
> Regards,
> Gyula

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message