Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-12610

Resources on classpath break PluginClassLoader isolation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.1, 2.4.1, 2.5.1, 2.7.0, 2.6.1
    • None
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              nigel.liang Nigel Liang
              nigel.liang Nigel Liang
              Magesh kumar Nandakumar Magesh kumar Nandakumar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: