Bug 1280149 - appletviewer in openjdk complains about /opt/X11/bin/xprop not being found, when xprop is located in /usr/bin.
appletviewer in openjdk complains about /opt/X11/bin/xprop not being found, w...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: java-atk-wrapper (Show other bugs)
23
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Anirudh Mukundan
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-10 22:15 EST by Giorgian Borca-Tasciuc
Modified: 2016-01-28 13:30 EST (History)
10 users (show)

See Also:
Fixed In Version: java-atk-wrapper-0.33.2-1.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-28 13:30:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Sample program to demonstrate bug (217 bytes, text/x-csrc)
2015-11-10 22:15 EST, Giorgian Borca-Tasciuc
no flags Details

  None (edit)
Description Giorgian Borca-Tasciuc 2015-11-10 22:15:12 EST
Created attachment 1092547 [details]
Sample program to demonstrate bug

Running appletviewer Test.java complains about /opt/X11/bin/xprop not being found.

xprop is located in /usr/bin in fedora 23.

Sample program attached to demonstrate problem.

Run:
javac Test.java
appletviewer Test.java 

Expected Results: appletviewer not complaining and throwing expectations, and figuring out where xprop is.


I appreciate the community effort.

Giorgian
Comment 1 Deepak Bhole 2015-11-11 15:10:14 EST
Looks like we may just need to add a path to the search location string/array. Assigning to Omair assuming this is something that can be quickly addressed.
Comment 2 Anirudh Mukundan 2015-11-12 14:58:19 EST
Hi Giorgian,

So I've tried reproducing your bug on Fedora 23, using the latest java-1.8.0-openjdk after a dnf update, but am unable to reproduce. 

Could you indicate the exact version of the openjdk packages you have installed, and also perhaps a text dump of how you run the program and the exact output you see? 

Thanks,
Anirudh
Comment 3 Giorgian Borca-Tasciuc 2015-11-12 16:08:32 EST
Here's what happens when I run it

[giorgian@fedora ~]$ javac Test.java
[giorgian@fedora ~]$ appletviewer Test.java 
java.io.IOException: Cannot run program "/opt/X11/bin/xprop": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at java.lang.Runtime.exec(Runtime.java:450)
	at java.lang.Runtime.exec(Runtime.java:347)
	at org.GNOME.Accessibility.AtkWrapper.<clinit>(AtkWrapper.java:34)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at java.lang.Class.newInstance(Class.java:442)
	at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:805)
	at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:887)
	at java.awt.Window.getToolkit(Window.java:1362)
	at java.awt.Window.init(Window.java:506)
	at java.awt.Window.<init>(Window.java:537)
	at java.awt.Frame.<init>(Frame.java:420)
	at java.awt.Frame.<init>(Frame.java:385)
	at sun.applet.AppletViewer.<init>(AppletViewer.java:159)
	at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:98)
	at sun.applet.AppletViewer.parse(AppletViewer.java:1158)
	at sun.applet.AppletViewer.parse(AppletViewer.java:1092)
	at sun.applet.Main.run(Main.java:156)
	at sun.applet.Main.main(Main.java:98)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 22 more


Info about openjdk:

[giorgian@fedora ~]$ sudo dnf install java-1.8.0-openjdk
Last metadata expiration check performed 0:00:57 ago on Thu Nov 12 16:03:56 2015.
Package java-1.8.0-openjdk-1:1.8.0.65-3.b17.fc23.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

[giorgian@fedora ~]$ dnf info java-1.8.0-openjdk
Last metadata expiration check performed 1 day, 19:00:24 ago on Tue Nov 10 21:05:03 2015.
Installed Packages
Name        : java-1.8.0-openjdk
Arch        : x86_64
Epoch       : 1
Version     : 1.8.0.65
Release     : 3.b17.fc23
Size        : 501 k
Repo        : @System
From repo   : updates
Summary     : OpenJDK Runtime Environment
URL         : http://openjdk.java.net/
License     : ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and
            : MPLv1.0 and MPLv1.1 and Public Domain and W3C
Description : The OpenJDK runtime environment.

Available Packages
Name        : java-1.8.0-openjdk
Arch        : i686
Epoch       : 1
Version     : 1.8.0.65
Release     : 3.b17.fc23
Size        : 217 k
Repo        : updates
Summary     : OpenJDK Runtime Environment
URL         : http://openjdk.java.net/
License     : ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and
            : MPLv1.0 and MPLv1.1 and Public Domain and W3C
Description : The OpenJDK runtime environment.

Giorgian
Comment 4 Andrew John Hughes 2015-11-12 17:24:49 EST
Ok, this isn't part of OpenJDK - I checked the sources and also couldn't reproduce it here - this hard-wired path is coming from the GNOME accessibility layer:

java.io.IOException: Cannot run program "/opt/X11/bin/xprop": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at java.lang.Runtime.exec(Runtime.java:450)
	at java.lang.Runtime.exec(Runtime.java:347)
	at org.GNOME.Accessibility.AtkWrapper.<clinit>(AtkWrapper.java:34)
Comment 5 Giorgian Borca-Tasciuc 2015-11-12 17:35:45 EST
(In reply to Andrew John Hughes from comment #4)
> Ok, this isn't part of OpenJDK - I checked the sources and also couldn't
> reproduce it here - this hard-wired path is coming from the GNOME
> accessibility layer:
> 
> java.io.IOException: Cannot run program "/opt/X11/bin/xprop": error=2, No
> such file or directory
> 	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
> 	at java.lang.Runtime.exec(Runtime.java:620)
> 	at java.lang.Runtime.exec(Runtime.java:450)
> 	at java.lang.Runtime.exec(Runtime.java:347)
> 	at org.GNOME.Accessibility.AtkWrapper.<clinit>(AtkWrapper.java:34)

What should I do then?
Comment 6 Andrew John Hughes 2015-11-12 17:54:51 EST
I think this bug needs to be looked at by whoever works on the accessibility layer. I'm not sure who that is.
Comment 7 Severin Gehwolf 2015-11-13 05:43:32 EST
I guess the problem goes away if Giorgian removes java-atk-wrapper.

$ jar -tf /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar | grep AtkWrapper
org/GNOME/Accessibility/AtkWrapper$1.class
org/GNOME/Accessibility/AtkWrapper$2.class
org/GNOME/Accessibility/AtkWrapper$3.class
org/GNOME/Accessibility/AtkWrapper$4.class
org/GNOME/Accessibility/AtkWrapper.class
$ rpm -qf /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar
java-atk-wrapper-0.33.2-0.fc23.x86_64
Comment 8 Deepak Bhole 2015-11-13 09:22:26 EST
(In reply to Andrew John Hughes from comment #6)
> I think this bug needs to be looked at by whoever works on the accessibility
> layer. I'm not sure who that is.

So is the problem in java-atk-wrapper or the code that it interfaces with in Gnome?
Comment 9 Giorgian Borca-Tasciuc 2015-11-13 10:57:46 EST
(In reply to Severin Gehwolf from comment #7)
> I guess the problem goes away if Giorgian removes java-atk-wrapper.
> 
> $ jar -tf /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar | grep AtkWrapper
> org/GNOME/Accessibility/AtkWrapper$1.class
> org/GNOME/Accessibility/AtkWrapper$2.class
> org/GNOME/Accessibility/AtkWrapper$3.class
> org/GNOME/Accessibility/AtkWrapper$4.class
> org/GNOME/Accessibility/AtkWrapper.class
> $ rpm -qf /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar
> java-atk-wrapper-0.33.2-0.fc23.x86_64

It's not exactly a functional problem, more of a aesthetics problem. Also this could also be the reason why (my) applets haven't been displaying the way I expect them too (It could just be me though. Just learning to use the Java AWT.)
Comment 10 Andrew John Hughes 2015-11-13 11:39:55 EST
(In reply to Deepak Bhole from comment #8)
> (In reply to Andrew John Hughes from comment #6)
> > I think this bug needs to be looked at by whoever works on the accessibility
> > layer. I'm not sure who that is.
> 
> So is the problem in java-atk-wrapper or the code that it interfaces with in
> Gnome?

Yes. I couldn't remember the name of the new package and it doesn't appear to be coming up for me to re-assign this bug to it. But not an OpenJDK issue.
Comment 11 Deepak Bhole 2015-11-13 14:35:38 EST
(In reply to Andrew John Hughes from comment #10)
> (In reply to Deepak Bhole from comment #8)
> > (In reply to Andrew John Hughes from comment #6)
> > > I think this bug needs to be looked at by whoever works on the accessibility
> > > layer. I'm not sure who that is.
> > 
> > So is the problem in java-atk-wrapper or the code that it interfaces with in
> > Gnome?
> 
> Yes. I couldn't remember the name of the new package and it doesn't appear
> to be coming up for me to re-assign this bug to it. But not an OpenJDK issue.

Thanks, re-assigning.
Comment 12 Deepak Bhole 2015-11-13 14:36:27 EST
Keeping assignment to Anirudh despite new component (which is also under our team) to investigate.
Comment 13 Timothy M. Butterworth 2015-12-31 22:30:31 EST
I have this same issue when trying to launch armitage.

I created a the /opt/X11/bin directory and then added a soft link

mkdir /opt/X11
mkdir /opt/X11/bin
ln -s /usr/bin/xprop /opt/X11/bin/xprop

This made the binary available! You may want to just add in soft links instead of rewritting openJDK for the mean time. This has been an issue in Fedora for quite a while.
Comment 14 Andrew John Hughes 2016-01-06 08:38:47 EST
> You may want to just add in soft links
> instead of rewritting openJDK for the mean time. This has been an issue in
> Fedora for quite a while.

As mentioned above, this is not an OpenJDK bug, but an issue with java-atk-wrapper. If you don't need the accessibility layer, you can just remove that package to fix the problem.

Anirudh, what is the status of this issue?
Comment 15 Anirudh Mukundan 2016-01-06 10:12:59 EST
(In reply to Andrew John Hughes from comment #14)
> > You may want to just add in soft links
> > instead of rewritting openJDK for the mean time. This has been an issue in
> > Fedora for quite a while.
> 
> As mentioned above, this is not an OpenJDK bug, but an issue with
> java-atk-wrapper. If you don't need the accessibility layer, you can just
> remove that package to fix the problem.
> 
> Anirudh, what is the status of this issue?

The issue is that sources downloaded for the package contain a pre-built AtkWrapper.java with an incorrect path to xprop. 

As of now, I have made a fix in rawhide to remove that file so that it is auto-generated again with the correct path during package installation.
Comment 16 Omair Majid 2016-01-06 10:30:27 EST
(In reply to Anirudh Mukundan from comment #15)
> As of now, I have made a fix in rawhide to remove that file so that it is
> auto-generated again with the correct path during package installation.

If the fix is safe to backport, please backport it to F23 too. Then we can close this bug.
Comment 17 Fedora Update System 2016-01-06 15:45:38 EST
java-atk-wrapper-0.33.2-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-458ecd40b9
Comment 18 Fedora Update System 2016-01-08 23:28:58 EST
java-atk-wrapper-0.33.2-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-458ecd40b9
Comment 19 Fedora Update System 2016-01-28 13:30:14 EST
java-atk-wrapper-0.33.2-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.