You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Erwan Loisant (Jira)" <ji...@apache.org> on 2021/01/21 14:20:00 UTC

[jira] [Commented] (FLINK-12461) Flink 1.8 not working with Scala 2.12.8

    [ https://issues.apache.org/jira/browse/FLINK-12461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17269333#comment-17269333 ] 

Erwan Loisant commented on FLINK-12461:
---------------------------------------

I tried to update Flink to Scala 2.12.13 (the latest version) but I'm having a compatibility error:

{{{{[ERROR] Failed to execute goal com.github.siom79.japicmp:japicmp-maven-plugin:0.11.0:cmp (default) on project flink-scala_2.12: Breaking the build because there is at least one incompatibility: org.apache.flink.api.scala.CoGroupDataSet.$anonfun$buildGroupSortList$1(org.apache.flink.api.common.typeinfo.TypeInformation,java.util.ArrayList,scala.Tuple2):METHOD_REMOVED,org.apache.flink.api.scala.typeutils.CaseClassTypeInfo.$anonfun$getFlatFields$1(int,java.util.List,scala.runtime.IntRef,org.apache.flink.api.common.typeinfo.TypeInformation):METHOD_REMOVED,org.apache.flink.api.scala.typeutils.CaseClassTypeInfo.$anonfun$getFlatFields$1$adapted(int,java.util.List,scala.runtime.IntRef,org.apache.flink.api.common.typeinfo.TypeInformation):METHOD_REMOVED -> [Help 1]}}}}

Any idea how to fix that?

> Flink 1.8 not working with Scala 2.12.8
> ---------------------------------------
>
>                 Key: FLINK-12461
>                 URL: https://issues.apache.org/jira/browse/FLINK-12461
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Scala
>    Affects Versions: 1.8.0
>            Reporter: Gaƫl Renoux
>            Priority: Major
>
> When using 1.8 with Scala 2.12.8 and trying to parse a scala.Map (not a java.util.Map), I get a: java.lang.ClassNotFoundException: scala.math.Ordering$$anon$9
> To reproduce:
>  - start with the Scala Maven archetype (org.apache.flink:flink-quickstart-scala:1.8.0)
>  - in the POM, set the scala.version to 2.12.8 and the scala.binary.version to 2.12
>  - in StreamingJob, add: env.fromElements[Map[String, Int]]()
> It works with Scala 2.12.7 (well, without putting anything in the job, it fails with "No operators defined in streaming topology", which is expected).
> I suspect this is linked to the binary incompatiblity of 2.12.8 with 2.12.7 (see the release note of 2.12.8), so compiling Flink with 2.12.8 instead of 2.12.7 might be enough (although it might stop working with 2.12.7?)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)