Issue 80383

Summary: NativeLibraryLoader.loadLibrary, native methods, multiple classloaders
Product: udk Reporter: Stephan Bergmann <stephan.bergmann.secondary>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, rene
Version: 680m224   
Target Milestone: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Stephan Bergmann 2007-08-06 15:51:56 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.
Comment 1 Stephan Bergmann 2007-08-06 15:54:22 UTC
.
Comment 2 Stephan Bergmann 2007-08-07 15:13:05 UTC
.
Comment 3 Martin Hollmichel 2007-12-07 13:00:18 UTC
set target to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Comment 4 Marcus 2017-05-20 11:31:42 UTC
Reset assigne to the default "issues@openoffice.apache.org".