Chesnay Schepler created FLINK-27974: ----------------------------------------
Summary: Potentially wrong classloader being used to create dynamic table sources Key: FLINK-27974 URL: https://issues.apache.org/jira/browse/FLINK-27974 Project: Flink Issue Type: Bug Components: Table SQL / Planner Affects Versions: 1.15.0 Reporter: Chesnay Schepler A user reported an issue on slack where a job fails in the CLI because of {{ClassNotFoundException: org.apache.flink.table.planner.delegation.ParserFactory}} in {{FileSystemTableFactory#formatFactoryExists}} when trying to load the {{Factory}} service. While looking through the call stack I noticed that the classloader passed via the context is a thread's context classloader, set in {{CatalogSourceTable#createDynamicTableSource}}. This seems a bit fishy; since this runs in the context of the CLI this CL is likely the user CL, but the planner classes are loaded in a separate classloader (not in the parent). As a result the planner classes cannot be looked up via the service loader mechanism. -- This message was sent by Atlassian Jira (v8.20.7#820007)