JDK-8029263 : The user's default browser can not launch after we click the button, and there is an IOException shown in the log text (java.io.IOException)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_11
  • CPU: sparc
  • Submitted: 2013-11-26
  • Updated: 2014-01-14
  • Resolved: 2013-12-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8 b122Fixed 9Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
Testsuite name: jck manual
JDK/JRE tested: jdk-8-ea-solaris-sparcv9.tar.gz (jdk8b117) 
OS/architecture: solaris11-sparcv9

Reproducible: Always
Reproducible on machine: stt-60-zone1.ru

Is it a Regression: Not sure

Is it a platform specific issue: Yes
Is it a new (previously unsupported) OS/browser/mode testing: No

Test run log location:http://jsqalab.us.oracle.com/results/Evergreen/8/b117/jck/solaris11-sparc/results/workDir/api/java_awt/interactive/Desktop/BROWSEInteractiveTests_DesktopBrowseTests.jtr
Test run result location:http://jsqalab.us.oracle.com/results/Evergreen/8/b117/jck/solaris11-sparc/results/

Steps to reproduce:
1.Install test bundle jdk8b117 from http://jre.us.oracle.com/java/re/jdk/8/promoted/ea/b117/bundles/solaris-sparcv9/jdk-8-ea-solaris-sparcv9.tar.gz to /workspace/jck
2.Download the JCK-runtime-8.jar from http://jre.sfbay.sun.com/java/re/jck/8/promoted/ea/b35/bundles/ to /workspace/jck and use /workspace/jck/jdk1.8.0/bin/java -jar JCK-runtime-8.jar to unzip it
3.From command line,  run the following command:    
/workspace/jck/jdk1.8.0/bin/java -showversion -cp /workspace/jck/JCK-runtime-8/classes:/workspace/jck/jdk1.8.0/lib/tools.jar -Djava.security.policy=/workspace/jck/JCK-runtime-8/lib/jck.policy=/workspace/jck/JCK-runtime-8/lib/jck.policy javasoft.sqe.tests.api.java.awt.interactive.Desktop.DesktopBrowseTests -TestCaseID  ALL 

Descriptions:
This test verifies the ability of the implementation to launch the default browser to display a URI.Enter a string that can be parsed to construct a URI.If the provided string cannot be parsed to construct a URI, the testcase fails.If the default browser is not able to handle the specified URI,the application registered for handling the specified type should be launched.The application is determined from the protocol and path of the URI, as defined by the URI class.If the browser or expected application was eventually launched,and the opened URI is constructed from the provided string, press \"Yes\", otherwise press \"No\".


Actual behavior:
We used Vncviewer to access the system.
The user's default browser can not launch after we click the button,and there has IOException shown in the log txt(java.io.IOException: Failed to show URI:http://www.baidu.com).

Validation:
1).sles10-x86,jdk8b111(32bit) passed
2).mac10.9-x64,jdk8b116(64bit) passed
3)solaris10-x64,jdk8b115(64bit) passed
4).solaris11-sparc,jdk8b116(64bit) failed
Comments
Verified in JDK8b122 Solaris 11 Sparcv9 Test javasoft.sqe.tests.api.java.awt.interactive.Desktop.DesktopBrowseTests passed with the output: browseURIWithoutApplicationAssociated: Passed. Action.BROWSE is not supported. Testcase is not applicable browse: Passed. Action.BROWSE is not supported. Testcase is not applicable STATUS:Passed.test cases: 2; all passed
10-01-2014

Release team: Approved for fixing as this is a tck-red issue.
17-12-2013

SQE: Ok to take this in 8
13-12-2013

Critical request justification: webrev: http://cr.openjdk.java.net/~azvegint/jdk/8/8029263/webrev.01/ review: http://mail.openjdk.java.net/pipermail/awt-dev/2013-December/006614.html risks: low, only Solaris affected fix rational: verify is action really supported or not issue impact: java.awt.Desktop.isSupported() returns true for unsupported actions suggested testing: run failing desktop tests on Solaris 11
13-12-2013

http://cr.openjdk.java.net/~azvegint/jdk/8/8029263/webrev.00/ This issue can be observed on Solaris 11 (sparcv9 or x86_64). gtk_show_uri() documentation[1] says: > The uri must be of a form understood by GIO (i.e. you need to install > gvfs to get support for uri schemes such as http:// or ftp://, as only > local files are handled by GIO itself). However it looks like that Solaris 11 supports gvfs for 32-bit applications only by default. gtk_show_uri() returns "Operation not supported" error message for 64-bit applications for schemes other than file://. Since b110 we don't have 32-bit JDK for Solaris anymore, so in most cases only an OPEN action is available(file://). Currently I am unable to find any robust way to determine do we have full gvfs support to handle URIs like mail:, http:// or not. We can use g_vfs_get_supported_uri_schemes()[2] and assume that we have full gvfs support if http:// scheme is present. But this function depends on a DBUS_SESSION_BUS_ADDRESS environment variable, which can be stripped off in some tests (in this case only file:// scheme will be returned). Old gnome_url_show() will not work too due to lack of 64-bit libgnomevfs-2.0 library. [1] https://developer.gnome.org/gtk2/stable/gtk2-Filesystem-utilities.html#gtk-show-uri [2] https://developer.gnome.org/gio/stable/GVfs.html#g-vfs-get-supported-uri-schemes
12-12-2013

The fix is on a review.
12-12-2013

The old one API (gnome_url_show()) and the new one introduced in JDK-2220226 (gtk_show_uri()) works fine only with 32 bit JDK. 64 bit JDK case: Before JDK-2220226(using gnome_url_show()) we just return Desktop.isDesktopSupported() false due to library load failure. After JDK-2220226(using gtk_show_uri()) all libraries loads succesfully, Desktop.isDesktopSupported() returns true, but gtk_show_uri() can handle only file:// URIs, http://, mailto:// and other not working. Documentation[1] says that gvfs need to be installed to handle such URIs. It looks like the case of this failure. Starting from b110 there is no 32 bit builds available for Solaris. A also attached a simple native program to demonstrate the issue, you can compile it with: gcc -m32 open_uri.c `pkg-config --cflags --libs gtk+-2.0` -o open_uri_x86 gcc -m64 open_uri.c `pkg-config --cflags --libs gtk+-2.0` -o open_uri_x86_64 ./open_uri_x86 will open URI successfully ./open_uri_x86_64 operation is not supported So the fix will be to return correct values in Desktop.isSupported(). [1]https://developer.gnome.org/gtk2/stable/gtk2-Filesystem-utilities.html#gtk-show-uri
06-12-2013

It's all passed that this case was ran on mac,windows,oel,solaris10 platform from jdk8b111 .But it's the first time for us to test on solaris11-sparc platform against jdk8b117,so we filed this bug.
04-12-2013

When it was introduced? Why you didn't file this issue before ATR end?
03-12-2013

JDK-2220226 replaced old way of URI opening with another (gtk_show_uri()) to prevent crashing on old systems. This new way requires a correct system proxy settings (if needed). If proxy settings are not set correctly the test will hang for a minute and than test fails. But in case of stt-60-zone1 test fails immediately, so this is likely not a proxy settings issue. Looks like it is Sparc specific issue, since I cannot reproduce this issue on Solaris x86_64. BTW, A simple program on C with similar calls works fine on this machine(if proxy settings are set correctly).
29-11-2013

please re-evaluate it
28-11-2013

The test was run on the one host stt-60-zone1, and the issue occurs for jdk8 and doesn't for jdk7. The proxy settings has not been changed during these runs. I've set up proxy directly in the browser on the host, the test behavior doesn't change. So your argument about a proxy isn't convincing in this case. Reopen the issue.
28-11-2013

Proxy settings are not set correctly in system. You can specify proxy in Network Proxy window (System -> Preferences -> Network Proxy).
27-11-2013

The issue is being reproduced on Solaris 11 sparc with jdk8b117 vs jck8b36 and jdk8b113 vs jck8b35. It is platform specific issue, it doesn't happen on Linux. The issue doesn't occur on jdk7. Steps to reproduce: ${jdk}/bin/java -showversion -cp ${jck}/classes:${jdk}/lib/tools.jar -Djava.security.policy=${jck}/lib/jck.policy javasoft.sqe.tests.api.java.awt.interactive.Desktop.DesktopBrowseTests -TestCaseID browse Output: java.io.IOException: Failed to show URI:http://www.yandex.ru at sun.awt.X11.XDesktopPeer.launch(XDesktopPeer.java:114) at sun.awt.X11.XDesktopPeer.browse(XDesktopPeer.java:98) at java.awt.Desktop.browse(Desktop.java:386) at javasoft.sqe.tests.api.java.awt.interactive.Desktop.DesktopBrowseTests$1.launch(DesktopBrowseTests.java:74) at javasoft.sqe.tests.api.java.awt.interactive.Desktop.DesktopInteractiveTest$3.actionPerformed(DesktopInteractiveTest.java:113) at java.awt.Button.processActionEvent(Button.java:409) at java.awt.Button.processEvent(Button.java:377) at java.awt.Component.dispatchEventImpl(Component.java:4885) at java.awt.Component.dispatchEvent(Component.java:4707) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:220) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:135) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:123) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:119) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:111) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) browse: Failed. IOException thrown for string: http://www.yandex.ru, - java.io.IOException: Failed to show URI:http://www.yandex.ru STATUS:Failed.test cases: 1; all failed; first test case failure: browse
27-11-2013

api/java_awt/interactive/Desktop/BROWSEInteractiveTests.html#DesktopBrowseTests
26-11-2013