United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7188396 Applet can't load native library on Linux
7188396 : Applet can't load native library on Linux

Details
Type:
Bug
Submit Date:
2012-08-01
Status:
Resolved
Updated Date:
2013-04-16
Project Name:
JDK
Resolved Date:
2012-08-15
Component:
client-libs
OS:
linux_ubuntu
Sub-Component:
java.awt
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
8

Related Reports
Relates:

Sub Tasks

Description
Testsuite name: deployment
Product(s) tested: plugin2
OS/architecture: Ubuntu x64

Reproducible: Always

Is it a Regression: No
Test result on FCS: Fails on 1.7 FCS, passes on 1.6_* 


Is it a platform specific issue: No

Test run log location: http://aurora-ds.ru.oracle.com:9500/runs/83613.ManualSubmit-1/html/testLoadLibraryyes.trace

Steps to reproduce:

run 'securitySignedJars' subsuite from 'plugin' suite in the new framework:

$ ant securitySignedJars

or after suite is run launch Tomcat again and open

http://localhost:8080/securitySignedJars/html/testLoadLibraryyes.html

The problem can be reproduced using stand-alone test:

stt-robot@sttrobot-VirtualBox:/export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/src$ cat Test.java 
public class Test {
    public static void main(String[] args) throws Exception
    {
            Runtime.getRuntime().load(args[0]);
    }
}

stt-robot@sttrobot-VirtualBox:/export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/src$ export JAVA_HOME=/export/jdk/jdk1.7.0
stt-robot@sttrobot-VirtualBox:/export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/src$ $JAVA_HOME/jre/bin/java  Test /export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/lib/libfortest/amd64/libstl.so 
Exception in thread "main" java.lang.UnsatisfiedLinkError: /export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/lib/libfortest/amd64/libstl.so: libjawt.so: cannot open shared object file: No such file or directory
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
	at java.lang.Runtime.load0(Runtime.java:792)
	at java.lang.Runtime.load(Runtime.java:780)
	at Test.main(Test.java:4)
stt-robot@sttrobot-VirtualBox:/export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/src$ export JAVA_HOME=/export/jdk/jdk1.6.0_
jdk1.6.0_13/    jdk1.6.0_29/    jdk1.6.0_32bit/ jdk1.6.0_33b03/ jdk1.6.0_33b04/ jdk1.6.0_35b01/ 
stt-robot@sttrobot-VirtualBox:/export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/src$ export JAVA_HOME=/export/jdk/jdk1.6.0_13/
stt-robot@sttrobot-VirtualBox:/export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/src$ $JAVA_HOME/jre/bin/java  Test /export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/lib/libfortest/amd64/libstl.so 
Exception in thread "main" java.lang.UnsatisfiedLinkError: /export/deployment_int_ws/new_framework/tests/plugin/securitySignedJars/lib/libfortest/amd64/libstl.so: libmawt.so: cannot open shared object file: No such file or directory
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
	at java.lang.Runtime.load0(Runtime.java:770)
	at java.lang.Runtime.load(Runtime.java:758)
	at Test.main(Test.java:4)

As you can see, with Java 6 libjawt.so is found and failure happens later

Affected tests:

SecuritySignedJarsTest::testLoadLibraryyes

                                    

Comments
EVALUATION

Should be fixed with 7190813 (which is pushed via AWT/Swing JDK8 forest), so I'm marking this bug as Fix Available.
                                     
2012-08-15
EVALUATION

Please, check if adding System.loadLibrary("jawt") in the beginning of the test helps.
                                     
2012-08-03
EVALUATION

Looks similar to the question posted to the AWT mailing list:
http://mail.openjdk.java.net/pipermail/awt-dev/2012-July/003203.html
Transferring to AWT team.
                                     
2012-08-02



Hardware and Software, Engineered to Work Together