0 Replies Latest reply on Nov 14, 2006 6:41 PM by Giuseppe Sarno

    Jboss and Native library (UnsatisfiedLinkError: Native Libra

    Giuseppe Sarno Newbie

      Hi I have different web applications sharing a Native library in the format of .so file, which I reference using the LD_LIBRARY_PATH env variable.

      Now when I deploy a second application I get the following exception:

      java.lang.UnsatisfiedLinkError: Native Library /framework/agent/liboam.so already loaded in another classloader
       at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1716)
       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
       at java.lang.Runtime.loadLibrary0(Runtime.java:822)
       at java.lang.System.loadLibrary(System.java:992)

      It looks like after a lot of research on the web that this is a common problem with Native Libray and class loading.
      Now the question is is there a way I can fix this in JBOSS,

      I think I have already the Jar file calling the System.loadLibrary in the default/lib directory and I was aasuming those jars would share the classloader, but apparently I still have the problem.

      Can anyone help ?