[
https://issues.apache.org/jira/browse/FLINK-16794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-16794:
-----------------------------------
Labels: auto-deprioritized-major stale-minor (was:
auto-deprioritized-major)
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help
the community manage its development. I see this issues has been marked as
Minor but is unassigned and neither itself nor its Sub-Tasks have been updated
for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is
still Minor, please either assign yourself or give an update. Afterwards,
please remove the label or in 7 days the issue will be deprioritized.
> ClassNotFoundException caused by ClassLoader.getSystemClassLoader using
> impertinently
> ---------------------------------------------------------------------------------------
>
> Key: FLINK-16794
> URL: https://issues.apache.org/jira/browse/FLINK-16794
> Project: Flink
> Issue Type: Improvement
> Components: Client / Job Submission, Runtime / REST
> Affects Versions: 1.8.0
> Reporter: victor.jiang
> Priority: Minor
> Labels: auto-deprioritized-major, stale-minor
>
> In some containerization environment,the context classloader is not the
> SystemClassLoader,it uses the customized classloader usually for the classes
> isolation ,so the ClassNotFoundException may be caused。recommends using
> getClass/Caller/ThreadCurrentContext 's ClassLoader。
> The related sources below:
> #
> [ClusterClient.java:113|https://github.com/apache/flink/blob/c6997c97c575d334679915c328792b8a3067cfb5/flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java#L113]:
> {{return getAccumulators(jobID, ClassLoader.getSystemClassLoader());}}
> #
> [BlobUtils.java:290|https://github.com/apache/flink/blob/c6997c97c575d334679915c328792b8a3067cfb5/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java#L290]:
> {{return (Throwable) InstantiationUtil.deserializeObject(bytes,
> ClassLoader.getSystemClassLoader());}}
> #
> [SerializedThrowableDeserializer.java:50|https://github.com/apache/flink/blob/c6997c97c575d334679915c328792b8a3067cfb5/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/json/SerializedThrowableDeserializer.java#L50]:
> {{return InstantiationUtil.deserializeObject(serializedException,
> ClassLoader.getSystemClassLoader());}}
> #
> [RemoteRpcInvocation.java:121|https://github.com/apache/flink/blob/c6997c97c575d334679915c328792b8a3067cfb5/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/messages/RemoteRpcInvocation.java#L121]:
> {{methodInvocation =
> serializedMethodInvocation.deserializeValue(ClassLoader.getSystemClassLoader());}}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)