[ https://issues.apache.org/jira/browse/FLINK-10904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16693591#comment-16693591 ]
Luka Jurukovski commented on FLINK-10904: ----------------------------------------- I have a shaded jar with a `main` entry point, it takes instructions as part of the argument and uses the JVM's service loader to find and instantiate the relevant classes. I tried using the Thread's classloader at this point but it still resulted in Class Def not found errors in certain circumstances. >Flink currently instantiates one classloader per parallel task that gets >created But all of these should still have the classloader that loaded the uploaded jar's classes in its hierarchy correct? Otherwise I don't see how all but one of these parallel classloader is able to get the class definition, since none of their parents classloaders loaded the class. > Expose Classloader before Pipeline execution > -------------------------------------------- > > Key: FLINK-10904 > URL: https://issues.apache.org/jira/browse/FLINK-10904 > Project: Flink > Issue Type: Wish > Reporter: Luka Jurukovski > Priority: Minor > > Not sure if this is something that I just have to deal with. However it would > be nice if the classloader can be accessed before the pipeline starts > executing. The case for this is that I am loading classes that contain Flink > operators. I am running into classdef not found issues because the > classloader used by Flink is different then the application program that is > being run. Currently what I have been doing as a work around is adding the > libs that cause these issues in the /lib directory of the Flink cluster and > marking it as provided in the application jar that is uploaded to the Flink > cluster. The issues with this are two fold, first it makes deployment more > complex, as well as there are cases where Classloading causes exceptions to > arise in unusual circumstances. Ie RabbitMQ connector caused issues only when > it was auto-recovering the connection, but not during normal ingest. I can > elaborate further if needed -- This message was sent by Atlassian JIRA (v7.6.3#76005)