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] [Commented] (FLINK-8264) Add Scala to the parent-first loading patterns
Date Fri, 15 Dec 2017 14:24:00 GMT

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

ASF GitHub Bot commented on FLINK-8264:
---------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/5166


> Add Scala to the parent-first loading patterns
> ----------------------------------------------
>
>                 Key: FLINK-8264
>                 URL: https://issues.apache.org/jira/browse/FLINK-8264
>             Project: Flink
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.4.0
>            Reporter: Stephan Ewen
>            Assignee: Stephan Ewen
>             Fix For: 1.5.0, 1.4.1
>
>
> A confusing experience happens when users accidentally package the Scala Library into
their jar file. The reversed class loading duplicates Scala's classes, leading to exceptions
like the one below.
> By adding {{scala.}} to the default 'parent-first-patterns' we can improve the user experience
in such situations.
> Exception Stack Trace:
> {code}
> java.lang.ClassCastException: cannot assign instance of org.peopleinmotion.TestFunction$$anonfun$1
to field org.apache.flink.streaming.api.scala.DataStream$$anon$7.cleanFun$6 of type scala.Function1
in instance of org.apache.flink.streaming.api.scala.DataStream$$anon$7
>         at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2233)
>         at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1405)
>         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2288)
>         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2206)
>         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2064)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1568)
>         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2282)
>         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2206)
>         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2064)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1568)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:428)
>         at org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:290)
>         at org.apache.flink.util.InstantiationUtil.readObjectFromConfig(InstantiationUtil.java:248)
>         at org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperator(StreamConfig.java:220)
>         ... 6 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message