Apache OpenOffice (AOO) Bugzilla – Issue 80383
NativeLibraryLoader.loadLibrary, native methods, multiple classloaders
Last modified: 2017-05-20 11:31:42 UTC
<http://www.openoffice.org/issues/show_bug.cgi?id=80338#desc21> revealed the following problem: Assume jurt.jar (including com.sun.star.lib.util.NativeLibraryLoader) is loaded by the application classloader (e.g., because jurt.jar is added the the JVM classpath) and java_uno.jar (including com.sun.star.bridges.jni_uno.JNI_proxy) is loaded by com.sun.star.lib.unoloader.UnoClassLoader (the normal situation; within OOo UnoClassLoader has some URLClassLoader as parent which in turn has the application class loader as parent). bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java:1.8 l. 50 calls NativeLibraryLoader.loadLibrary to load the java_uno dynamic library needed by the dispatch_call native method. NativeLibraryLoader.loadLibrary uses System.load or System.loadLibrary to load the library. Later, calling JNI_proxy.dispatch_call leads to an UnsatisfiedLinkError. Obviously, the JVM does not allow code loaded with the UnoClassLoader to resolve native methods against libraries loaded through code loaded with the application classloader.
.
set target to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Reset assigne to the default "issues@openoffice.apache.org".