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.voltage.securedata.enterprise.ConstantsNative.DIGEST_MD5()I which means
that it could not find vibesimplejava in the loaded libs but I know that
the if was not executed because vibesimplejava was present in loadedlibs(
the control never went inside the if block. Any other suggestions?

Thanks,
Vishwas






On Tue, Aug 27, 2019 at 12:25 AM Jörn Franke <jornfra...@gmail.com> wrote:

> 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 <vsirav...@gmail.com>:
>
> 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 Library 
> /usr/mware/SimpleAPI/voltage-simple-api-java-05.12.0000-Linux-x86_64-64b-r234867/lib/libvibesimplejava.so
>  already loaded in another classloader
>
> This happens because the dylib has already been loaded once by the
> taskmanger, how can I mitigate this? It seems problematic if two
> applications are loading the same dylib.
>
> Thanks,
> Vishwas
>
>

Reply via email to