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日周六
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
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
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