[ https://issues.apache.org/jira/browse/FLINK-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chesnay Schepler updated FLINK-11431: ------------------------------------- Fix Version/s: 1.9.0 Component/s: Runtime / Coordination Summary: Upgrade Akka to 2.5 (was: Akka dependency not compatible with java 9 or above) > Upgrade Akka to 2.5 > ------------------- > > Key: FLINK-11431 > URL: https://issues.apache.org/jira/browse/FLINK-11431 > Project: Flink > Issue Type: Sub-task > Components: Build System, Runtime / Coordination > Affects Versions: 1.7.1 > Reporter: Matthieu Bonneviot > Assignee: Chesnay Schepler > Priority: Minor > Labels: pull-request-available > Fix For: 1.9.0 > > Time Spent: 10m > Remaining Estimate: 0h > > {noformat} > 2019-01-24 14:43:52,059 ERROR akka.remote.Remoting > - class [B cannot be cast to class [C ([B and [C are in module > java.base of loader 'bootstrap') > java.lang.ClassCastException: class [B cannot be cast to class [C ([B and [C > are in module java.base of loader 'bootstrap') > at akka.remote.artery.FastHash$.ofString(LruBoundedCache.scala:18) > at > akka.remote.serialization.ActorRefResolveCache.hash(ActorRefResolveCache.scala:61) > at > akka.remote.serialization.ActorRefResolveCache.hash(ActorRefResolveCache.scala:55) > at > akka.remote.artery.LruBoundedCache.getOrCompute(LruBoundedCache.scala:110) > at > akka.remote.RemoteActorRefProvider.resolveActorRef(RemoteActorRefProvider.scala:403) > at akka.actor.SerializedActorRef.readResolve(ActorRef.scala:433) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) > at > java.base/java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1250) > at > java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2096) > at > java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1594)Running > a jobmanager with java 11 fail with the following call stack: > {noformat} > Flink master is using akka 2.4.20. > After some investigation, the error in akka comes from the following line: > {code} > def ofString(s: String): Int = { > val chars = Unsafe.instance.getObject(s, > EnvelopeBuffer.StringValueFieldOffset).asInstanceOf[Array[Char]] > {code} > from java 9 it is now an array of byte. The akka code in the newer version is: > {code} > public static int fastHash(String str) { > ... > if (isJavaVersion9Plus) { > final byte[] chars = (byte[]) instance.getObject(str, > stringValueFieldOffset); > ... > } else { > final char[] chars = (char[]) instance.getObject(str, > stringValueFieldOffset); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)