Re: Flink fails to load class from configured classpath using PipelineOptions

2021-12-20 Thread Yang Wang
Yes. You need to set the "pipeline.classpath" via flink-conf.yaml or CLI options(-C/--classpath). I do not think setting it in your main class could work. Just like you said, the user classloader will not be updated after the user main class is executed. Best, Yang Pouria Pirzadeh 于2021年12月18日周六

Re: Flink fails to load class from configured classpath using PipelineOptions

2021-12-17 Thread Pouria Pirzadeh
I have tried 'PipelineOptions.CLASSPATHS'; It also fails with ClassNotFoundException with the exact same error stack trace as PipelineOptions.JARS. FYI The Same application jar works fine if submitted via Flink CLI using 'flink run' with the "-C" option to update classpath: /bin/flink run --detach

Re: Flink fails to load class from configured classpath using PipelineOptions

2021-12-16 Thread Yang Wang
The config option "pipeline.jars" is used to specify the user jar, which contains the main class. I think what you need is "pipeline.classpaths". /** * A list of URLs that are added to the classpath of each user code classloader of the program. * Paths must specify a protocol (e.g. file://) and

Flink fails to load class from configured classpath using PipelineOptions

2021-12-16 Thread Pouria Pirzadeh
I am developing a Java application which uses UDFs on Flink 1.14. It uses PipelineOptions.JARS config to add jar files, containing UDF classes, dynamically to the user classpath in the main method; However the application fails to load UDF class from configured jar files at job launch time with and