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

Yun Gao commented on FLINK-20082:
---------------------------------

Hi [~czchen] Sorry I tried but I still not yet be able to reproduce the 
original exception, but I have some found that:
 # For ValueStateDescriptor, it has re-implement the writeObject method, if is 
created with _{{new ValueStateDescriptor[Long]("last_event_time", 
classOf[Long], 0L)}}_, it would throws NullPointerException since it tries to 
serialize the default value due to the serializer is not set. However, if it is 
created with _{{new ValueStateDescriptor[Long]("last_event_time", 
LongSerializer.INSTANCE, 0L)}}_ or _{{new 
ValueStateDescriptor[Long]("last_event_time", LongSerializer.INSTANCE)}}_, 
either the serializer is set or the default value is null, it would be right. 
This might be a problem here. Another solution would be to create 
`ValueStateDescriptor` inside the open function.

For the original issue, I'm not sure if it is related to the above issue, could 
you also provide a small example to reproduce the exceptions ? Very thanks!

> Cannot start Flink application due to "cannot assign instance of 
> java.lang.invoke.SerializedLambda to type scala.Function1
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-20082
>                 URL: https://issues.apache.org/jira/browse/FLINK-20082
>             Project: Flink
>          Issue Type: Bug
>          Components: API / DataStream, API / Scala
>    Affects Versions: 1.11.2
>         Environment: * Flink 1.11.2
>  * Java 11
>  * Scala 2.12.11
>            Reporter: ChangZhuo Chen (陳昌倬)
>            Priority: Major
>         Attachments: Flink-1.11.2_Scala-2.11.log, 
> Flink-1.11.2_Scala-2.12.log, image-20201110-060934.png
>
>
> Hi,
>  * Our Flink application (Java 11 + Scala 2.12) has the following problem 
> when executing it. It cannot be run in Flink cluster.
>  * The problem is similar to 
> https://issues.apache.org/jira/browse/SPARK-25047, so maybe the same fix 
> shall be implemented in Flink?
> !image-20201110-060934.png!



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

Reply via email to