我创建了一个flinkjava应用程序。从客户机获取数据后,我的flink工作必须处理数据并将其推入ibmcos,然后我得到了这个错误
java.io.NotSerializableException: com.ibm.cloud.objectstorage.oauth.DefaultTokenProvider
请找到完整的堆栈跟踪
org.apache.flink.api.common.InvalidProgramException: com.ibm.cloud.objectstorage.oauth.DefaultTokenProvider@1d8824ba is not serializable. The object probably
contains or references non serializable fields.
[main] ERROR com.flink.cos.sample.Main - Error1: com.ibm.cloud.objectstorage.oauth.DefaultTokenProvider@1d8824ba is not serializable. The object probably contains or references non serializable fields.
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:151)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:71)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.clean(StreamExecutionEnvironment.java:1821)
at org.apache.flink.streaming.api.datastream.DataStream.clean(DataStream.java:188)
at org.apache.flink.streaming.api.datastream.DataStream.map(DataStream.java:590)
Caused by: java.io.NotSerializableException: com.ibm.cloud.objectstorage.oauth.DefaultTokenProvider
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1215)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:365)
at org.apache.flink.util.InstantiationUtil.serializeObject(InstantiationUtil.java:586)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:133)
... 11 more
暂无答案!
目前还没有任何答案,快来回答吧!