Bug 565753 - Cannot run program "xdg-mime": error=2, No such file or directory
Summary: Cannot run program "xdg-mime": error=2, No such file or directory
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.16   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-01 05:24 EDT by Mickael Istria CLA
Modified: 2021-02-10 09:36 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2020-08-01 05:24:35 EDT
On the CentOS 8 CI machines, trying to test LSP4E:

!ENTRY org.eclipse.urischeme 4 0 2020-08-01 00:29:15.795
!MESSAGE Cannot run program "xdg-mime": error=2, No such file or directory
!STACK 0
java.io.IOException: Cannot run program "xdg-mime": error=2, No such file or directory
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at org.eclipse.urischeme.internal.registration.ProcessExecutor.execute(ProcessExecutor.java:36)
	at org.eclipse.urischeme.internal.registration.RegistrationLinux.getRegisteredDesktopFileForScheme(RegistrationLinux.java:136)
	at org.eclipse.urischeme.internal.registration.RegistrationLinux.determineHandlerLocation(RegistrationLinux.java:80)
	at org.eclipse.urischeme.internal.registration.RegistrationLinux.getSchemesInformation(RegistrationLinux.java:69)
	at org.eclipse.urischeme.AutoRegisterSchemeHandlersJob.run(AutoRegisterSchemeHandlersJob.java:63)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 7 more
Comment 1 Rolf Theunissen CLA 2020-08-03 02:05:34 EDT
Did you check that 'xdg-mime' is installed on the machine? Why is this an issue for Platform-IDE?
Comment 2 Mickael Istria CLA 2020-08-03 02:59:36 EDT
(In reply to Rolf Theunissen from comment #1)
> Did you check that 'xdg-mime' is installed on the machine? Why is this an
> issue for Platform-IDE?

xdg-mime is indeed not installed.
But this environment is still a legal one for Eclipse Platform and is a typical one on CI, and the code that tries to invoke xdg-mime should be guarded to avoid such exceptions in case xdg-mime is not there.
Comment 3 Martin D'Aloia CLA 2020-10-05 08:47:48 EDT
We are seeing the same error on a Ubuntu 18.04 (in a Jenkins agent)
Comment 4 Aurelien Pupier CLA 2021-02-10 09:36:34 EST
same error on RHEL 7