Bug 399339 - Startup error dialog when the Eclipse "application" can not be found should be improved
Summary: Startup error dialog when the Eclipse "application" can not be found should b...
Status: NEW
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-28 18:24 EST by Martin Oberhuber CLA
Modified: 2013-10-31 11:20 EDT (History)
5 users (show)

See Also:


Attachments
Screenshot of dialog when Eclipse application is not found (7.00 KB, image/gif)
2013-01-28 18:24 EST, Martin Oberhuber CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2013-01-28 18:24:00 EST
Created attachment 226232 [details]
Screenshot of dialog when Eclipse application is not found

Build ID: I20130128-0800 (Kepler 4.3m5 pre)
CQ:WIND00392998

It sometimes happens for us that p2 does not properly find all registered extension locations. Then the "application" that we start Eclipse with can not be found anywhere.

This is easy to simulate by editing configuration/config.ini and specifying eg
   eclipse.application=org.eclipse.foo.ide.workbench
Running eclipse.exe brings up attached dialog, which points to the problem but is not user-friendly: "An error has occurred. See the log file D:\..."

- Instead of pointing to the log file (which can't even be copied-and-pasted),
  it should display the error/log contents in the dialog itself, or provide
  a button that helps opening the log in an editor.

A better error message would read, for instance:

"Fatal error launching Eclipse: The Application "org.eclipse.foo.ide.workbench" could not be found in the registry. For more details, see the log file
D:\eclipse\configuration\12345667890.log"
Comment 1 Timo Kinnunen CLA 2013-10-31 10:43:33 EDT
I just got hit by this when switching from Eclipse IDE for Java Developers to Eclipse Standard/SDK but I didn't even see an error dialog. 

Standard installed and restarted without a hitch, but after uninstalling Eclipse IDE for Java Developers feature the restart didn't bring Eclipse back. Now Eclipse doesn't start anymore or show any UI or print anything usable to console. When running eclipsec.exe -debug the only clue that's left is a eclipse\configuration\138228533131.log:

!SESSION 2013-10-31 16:08:53.068 -----------------------------------------------
eclipse.buildId=4.4.0.I20130918-2000
java.version=1.7.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86 -debug

!ENTRY org.eclipse.osgi 4 0 2013-10-31 16:08:53.646
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.ant.ui.antRunner, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.ui.ide.workbench, org.eclipse.pde.build.Build, org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.pde.junit.runtime.coretestapplicationnonmain, org.eclipse.pde.junit.runtime.nonuithreadtestapplication.
	at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
	at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Comment 2 Timo Kinnunen CLA 2013-10-31 11:20:40 EDT
Making the following changes brought the installation back. 

In configuration\config.ini replace:
eclipse.p2.profile=epp.package.java
osgi.instance.area.default=
eclipse.product=
eclipse.application=

with:
eclipse.p2.profile=epp.package.standard
osgi.instance.area.default=@user.home/workspace
eclipse.product=org.eclipse.platform.ide
eclipse.application=org.eclipse.ui.ide.workbench

In eclipse.ini add:
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M

and update:
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m

These came from comparing with a working Eclipse Standard instance.