-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b06
-
generic, x86
-
other, linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8045463 | 8u25 | David Buck | P3 | Resolved | Fixed | b01 |
JDK-8031551 | 8u20 | David Buck | P3 | Closed | Fixed | b01 |
JDK-8031205 | 8u5 | David Buck | P3 | Closed | Fixed | b04 |
JDK-8039711 | emb-8u26 | David Buck | P3 | Resolved | Fixed | b17 |
JDK-8037713 | emb-8u6 | David Buck | P3 | Closed | Fixed | |
JDK-8033884 | 7u80 | David Buck | P3 | Resolved | Fixed | b01 |
JDK-8034705 | 7u65 | David Buck | P3 | Resolved | Fixed | b01 |
JDK-8031384 | 7u60 | David Buck | P3 | Resolved | Fixed | b04 |
JDK-8031204 | 7u55 | David Buck | P3 | Closed | Fixed | b04 |
JDK-8030971 | 6u75 | David Buck | P3 | Closed | Fixed | b02 |
JDK-8030970 | 5.0u65 | David Buck | P3 | Closed | Fixed | b03 |
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)
and
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.9-42.0.3.EL #1 Fri Oct 6 05:59:54 CDT 2006 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
When running inside a custom JNI library creating an instance of any awt class fails with an UnsatisfiedLinkError for libmawt.so.
The error was first seen with 1.6, but don't know if present in 1.5. Code which runs under 1.4.2 but will not run under 1.6.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile a C++ program which starts JNI. Inside the Java application, create a separate thread to instantiate awt classes, and then return. The first instantiation of any awt class fails with UnsatisfiedLinkError for libmawt.so.
Build the source by typing "./build.bash" on the Linux command line. The
example may be executed by typing "./run_oasis.bash". The "./clean.bash"
command cleans up the directory.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The application's Swing-based windows would be displayed on the screen. In the testcase a blank window should be displayed on the screen
ACTUAL -
Custom JNI library is found, but dependent library libmawt.so is not.
The following is output:
csh-3.00$ ./run_oasis.bash
callback from JNI
JavaJNIInt: initCPP() succeeded
JVM started in CPPJNIInt::init
Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: Can't
load library: /home/alink/sunbug/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1650)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at
sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)
at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29)
at java.awt.Component.<clinit>(Component.java:552)
at JavaJNIInt.run(JavaJNIInt.java:41)
at java.lang.Thread.run(Thread.java:619)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: Can't load library: /home/alink/alink_work3/Source/SimDesEng/exe/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1650)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1594)
at java.awt.Toolkit.<clinit>(Toolkit.java:1616)
at java.awt.Color.<clinit>(Color.java:263)
at MapBuilder.<init>(MapBuilder.java:71)
at MapGraphics.<clinit>(MapGraphics.java:26)
at cDataInterface.<clinit>(cDataInterface.java:245)
at JavaJNIInt.run(JavaJNIInt.java:352)
at java.lang.Thread.run(Thread.java:619)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Attached seperatly
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No work around at this time, other than regressing to Java 1.4.2
Attempted work-arounds suggested by similar problem reported in Bug 6539705 with no improvement in behaviour.
- backported by
-
JDK-8031384 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Resolved
-
JDK-8033884 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Resolved
-
JDK-8034705 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Resolved
-
JDK-8039711 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Resolved
-
JDK-8045463 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Resolved
-
JDK-8030970 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Closed
-
JDK-8030971 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Closed
-
JDK-8031204 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Closed
-
JDK-8031205 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Closed
-
JDK-8031551 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Closed
-
JDK-8037713 JNI use results in UnsatisfiedLinkError looking for libmawt.so
- Closed