当前位置:   article > 正文

【Flink】 is not serializable. The object probably contains or references non serializable fields

is not serializable. the object probably contains or references non serializ

在idea本地执行Flink例子的时候出现如下图标红问题

Exception in thread "main" org.apache.flink.api.common.InvalidProgramException: MysqlParam(url=jdbc:mysql://node01:3306/flink, username=root, password=root, sql=insert into first(name) values(?);) is not serializable. The object probably contains or references non serializable fields.
    at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:164)
    at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:132)
    at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:69)
    at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.clean(StreamExecutionEnvironment.java:2052)
    at org.apache.flink.streaming.api.datastream.DataStream.clean(DataStream.java:203)
    at org.apache.flink.streaming.api.datastream.DataStream.addSink(DataStream.java:1243)
    at com.flink.exampl

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/767774
推荐阅读
相关标签
  

闽ICP备14008679号