ammu20-dev commented on code in PR #25656: URL: https://github.com/apache/flink/pull/25656#discussion_r1904076204
########## flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java: ########## @@ -1029,6 +1029,11 @@ private TableResultInternal executeInternal( defaultJobName, jobStatusHookList); try { + // Current context class loader here is the application class loader. Review Comment: @afedulov I am relatively new here and am unsure about the case mentioned. Could you help clarify or point me in the right direction. @davidradl > Can we put the jar file in lib and avoid the dynamic class load? My intend is to use the JARs through ADD JAR statement, I guess putting them in lib folder would be a separate case and we might end up in ignoring the issue using this approach. > Also looking at the fix again - does this mean that we no longer get access to any content from the user class loader, as we have replaced it with a different class loader in the parameter now? I am setting it back to the previous context class loader once this method is invoked. > The PR title of the issue implies that the classloader changes with checkpointing - why is this? The issue is occurring exactly from here: [https://github.com/apache/flink/blob/release-1.20/flink-streaming-java/src/main/ja[…]pache/flink/streaming/api/graph/StreamingJobGraphGenerator.java](https://github.com/apache/flink/blob/release-1.20/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java#L534) This method is for performing validations incase checkpointing is enabled for a job. See: [https://github.com/apache/flink/blob/release-1.20/flink-streaming-java/src/main/ja[…]pache/flink/streaming/api/graph/StreamingJobGraphGenerator.java](https://github.com/apache/flink/blob/release-1.20/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java#L505) There is an internal classloading happening here only in case checkpointing is enabled. This class loading requires the child class loader for loading classes but instead it is receiving the app class loader which is failing to resolve the added jars. This is the root cause of the failure. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org