You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chris Egerton (Jira)" <ji...@apache.org> on 2022/11/23 13:40:00 UTC

[jira] [Resolved] (KAFKA-12610) Resources on classpath break PluginClassLoader isolation

     [ https://issues.apache.org/jira/browse/KAFKA-12610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Egerton resolved KAFKA-12610.
-----------------------------------
    Fix Version/s: 3.4.0
       Resolution: Fixed

> Resources on classpath break PluginClassLoader isolation
> --------------------------------------------------------
>
>                 Key: KAFKA-12610
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12610
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 2.3.1, 2.4.1, 2.5.1, 2.7.0, 2.6.1
>            Reporter: Nigel Liang
>            Assignee: Greg Harris
>            Priority: Major
>              Labels: connect
>             Fix For: 3.4.0
>
>
> The `PluginClassLoader` does not override `getResource` method it inherits from `ClassLoader` . The default implementation searches for resources in parent loader before calling its own `findResource` method. The result of this is that connectors or dependencies of connectors attempting to read resources in jars that may exist on the classpath get the version of the resource from the jar on classpath instead of from the jar in pluginpath.
> I have put together a testcase to demonstrate this issue at https://github.com/ncliang/get-resource-example/blob/classpath-resource-leaks/src/test/java/com/nigelliang/PluginClassLoaderTest.java



--
This message was sent by Atlassian Jira
(v8.20.10#820010)