Hi,
we just released Flink 1.4.0 [1]. Maybe it is possible for you to
upgrade? One of the greatest features is improved classloading and
better dependency management.
I think this would be the easiest solution for you. Otherwise let us
know if you still need help.
Regards,
Timo
[1]
https://flink.apache.org/news/2017/12/12/release-1.4.0.html#a-significantly-improved-dependency-structure-and-reversed-class-loadingAm 12/13/17 um 1:58 PM schrieb Jinhua Luo:
> Hi All,
>
> The io.netty package included in flnk 1.3.2 is 4.0.23, while the
> latest lettuce-core (4.4) depends on netty 4.0.35.
>
> If I include netty 4.0.35 in the app jar, it would throw
> java.nio.channels.UnresolvedAddressException. It seems the netty
> classes are mixed between versions from app jar and flink runtime.
>
> If I exclude netty from app jar, then the lettuce throws
> java.lang.NoSuchMethodError:
> io.netty.util.CharsetUtil.encoder(Ljava/nio/charset/Charset;)Ljava/nio/charset/CharsetEncoder,
> because it needs that method but flink's netty version do not provide.
>
> Is it a bug? Does the flink runtime provide individual class loader
> env for app? That is, is there some clean way for the app to use
> package solely from the app jar?
>
> Now my workaround is degrade the lettuce version to 4.2, because it
> depends on nettty 4.0.20. I also include netty into the app jar, now
> it seems no conflict with the flink runtime. It's weird.
>
> Please help, thanks.