You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Stephan Ewen (JIRA)" <ji...@apache.org> on 2017/12/14 12:48:00 UTC

[jira] [Created] (FLINK-8264) Add Scala to the parent-first loading patterns

Stephan Ewen created FLINK-8264:
-----------------------------------

             Summary: 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)