Bug 565753

Summary: Cannot run program "xdg-mime": error=2, No such file or directory
Product: [Eclipse Project] Platform Reporter: Mickael Istria <mistria>
Component: IDEAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: apupier, ma.becker, martindaloia, rolf.theunissen
Version: 4.16   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

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