Flink TableAPI Issue: cannot assign instance of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.util.LRUMap to field

classic Classic list List threaded Threaded
3 messages Options
Zed
Reply | Threaded
Open this post in threaded view
|

Flink TableAPI Issue: cannot assign instance of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.util.LRUMap to field

Zed
When I submitted a flink-table-sql job to yarn, the following exception came
out. Wondering how to solve it. Anyone can help me with that? Appreciate
it!!!!


org.apache.flink.streaming.runtime.tasks.StreamTaskException: Cannot
instantiate user function.
        at
org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperatorFactory(StreamConfig.java:275)
        at
org.apache.flink.streaming.runtime.tasks.OperatorChain.<init>(OperatorChain.java:126)
        at
org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:459)
        at
org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:528)
        at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:721)
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:546)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: cannot assign instance of
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.util.LRUMap
to field
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.deser.DeserializerCache._cachedDeserializers
of type java.util.concurrent.ConcurrentHashMap in instance of
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.deser.DeserializerCache
        at
java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2287)
        at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1417)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2293)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
        at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
        at
org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:576)
        at
org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:562)
        at
org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:550)
        at
org.apache.flink.util.InstantiationUtil.readObjectFromConfig(InstantiationUtil.java:511)
        at
org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperatorFactory(StreamConfig.java:260)
        ... 6 more




--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Flink TableAPI Issue: cannot assign instance of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.util.LRUMap to field

Jark
Administrator
检查下提交作业的 flink 版本,和 yarn 集群上部署的 flink 版本是否一致。
或者可能是你集群中有两个不同版本的 flink-shaded-jackson 包。

On Wed, 2 Dec 2020 at 11:55, Zed <[hidden email]> wrote:

> When I submitted a flink-table-sql job to yarn, the following exception
> came
> out. Wondering how to solve it. Anyone can help me with that? Appreciate
> it!!!!
>
>
> org.apache.flink.streaming.runtime.tasks.StreamTaskException: Cannot
> instantiate user function.
>         at
>
> org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperatorFactory(StreamConfig.java:275)
>         at
>
> org.apache.flink.streaming.runtime.tasks.OperatorChain.<init>(OperatorChain.java:126)
>         at
>
> org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:459)
>         at
>
> org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:528)
>         at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:721)
>         at org.apache.flink.runtime.taskmanager.Task.run(Task.java:546)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.ClassCastException: cannot assign instance of
> org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.util.LRUMap
> to field
>
> org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.deser.DeserializerCache._cachedDeserializers
> of type java.util.concurrent.ConcurrentHashMap in instance of
>
> org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.deser.DeserializerCache
>         at
>
> java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2287)
>         at
> java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1417)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2293)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
>         at
>
> org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:576)
>         at
>
> org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:562)
>         at
>
> org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:550)
>         at
>
> org.apache.flink.util.InstantiationUtil.readObjectFromConfig(InstantiationUtil.java:511)
>         at
>
> org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperatorFactory(StreamConfig.java:260)
>         ... 6 more
>
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/
>
Zed
Reply | Threaded
Open this post in threaded view
|

Re: Flink TableAPI Issue: cannot assign instance of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.util.LRUMap to field

Zed
我本地运行是没有问题的,上传到服务器就会出现这个问题,本地跟服务器都是1.11.2版本,flink-shaded-jackson是2.9.8-7.0。不太清楚flink-shaded-jackson跟flink的对应版本选择。



--
Sent from: http://apache-flink.147419.n8.nabble.com/