You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (Jira)" <ji...@apache.org> on 2022/06/09 14:12:00 UTC
[jira] [Created] (FLINK-27974) Potentially wrong classloader being used to create dynamic table sources
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)