Hi guys,
I have a flink application that loads a dylib like this
System.loadLibrary("vibesimplejava");
The application runs fine , when I restart the job I get this exception :
com.visa.aip.cryptolib.aipcyptoclient.EncryptionException: Unexpected
errorjava.lang.UnsatisfiedLinkError: Native Libr
I don’t know Dylibs in detail, but can you call a static method where it checks
if it has been already executed and if not then it loads the library (Singleton
pattern)?
> Am 27.08.2019 um 06:39 schrieb Vishwas Siravara :
>
> Hi guys,
> I have a flink application that loads a dylib like this
>
Hi Jörn,
I tried that. Here is my snippet :
String[] loadedlibs =
getLoadedLibraries(Thread.currentThread().getContextClassLoader());
if(!containsVibeSimpleLib(loadedlibs)) {
System.loadLibrary("vibesimplejava");
}
Now I get the exception Unexpected errorjava.lang.UnsatisfiedLinkError:
com.vo
Hi Vishwas,
There is a known issue in the Flink Jira project [1].
Is it possible that you have encountered the same problem?
[1]: https://issues.apache.org/jira/browse/FLINK-11402
Regards,
Aleksey
On Tue, Aug 27, 2019 at 8:03 AM Vishwas Siravara
wrote:
> Hi Jörn,
> I tried that. Here is my s
Yes this is exactly what happens , as a work around I created a small jar
file which has code to load the dylib and I placed it under the lib folder
, this library is in provided scope in my actual job, so the dylib gets
loaded only once when the tm/jm jvm starts .
What I found interesting in my ol
Hi Vishwas,
I think it just because dylib is loaded more than once in a jvm
process(TaskManager).
Multiple tasks are deployed in one TaskManager and running in different
threads.
So if you want to make the dylib only loaded once, maybe you use the parent
classloader.
You could use the the followin