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

Resources on classpath break PluginClassLoader isolation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.1, 2.4.1, 2.5.1, 2.7.0, 2.6.1
    • 3.4.0
    • 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

        Activity

          People

            gharris1727 Greg Harris
            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:
              Resolved: