flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-11431) Akka dependency not compatible with java 9 or above
Date Fri, 22 Mar 2019 12:03:00 GMT

     [ https://issues.apache.org/jira/browse/FLINK-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

ASF GitHub Bot updated FLINK-11431:
-----------------------------------
    Labels: pull-request-available  (was: )

> Akka dependency not compatible with java 9 or above
> ---------------------------------------------------
>
>                 Key: FLINK-11431
>                 URL: https://issues.apache.org/jira/browse/FLINK-11431
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Build System
>    Affects Versions: 1.7.1
>            Reporter: Matthieu Bonneviot
>            Assignee: Chesnay Schepler
>            Priority: Minor
>              Labels: pull-request-available
>
> {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)

Mime
View raw message