Bug 15681 - Internal error installing hand-rolled feature with missing feature
Summary: Internal error installing hand-rolled feature with missing feature
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P2 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Christophe Elek CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 15398
Blocks:
  Show dependency tree
 
Reported: 2002-05-09 17:25 EDT by Jim des Rivieres CLA
Modified: 2002-05-17 19:18 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim des Rivieres CLA 2002-05-09 17:25:50 EDT
Integration build 20020508 (1411)

Trying to use the update manager to install a hand-rolled feature from 
a local update site. I screwed up and forgot to include one of the
plug-ins mentioned in the feature.xml. It makes it as far as the
Continue Installing Feature, and then silently gives up. No error
is reported to the user, and the user is never ask for restart.

The log shows its getting an exception.

In cases like this, the user should probably be told that there is
something wrong with the update site.

.log contents
=============
!SESSION ----------------------------------------------------------------------
java.fullversion=J2RE 1.3.1 IBM Windows 32 build cn131-20020403 (JIT enabled: 
jitc)
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -ws win32 -feature org.eclipse.sdk -install 
file:/D:/eclipse-SDK-200205081411-win32/eclipse/
[deletia]
!ENTRY org.eclipse.update.core 0 4 Thu May 09 17:21:52 EDT 2002
!MESSAGE Unable to complete action for feature "Eclipse Platform (Windows)" 
due to errors.
!STACK org.eclipse.core.runtime.CoreException[0]: java.io.IOException: Unable 
to return reference 
file:C:/temp/TestEclipseUpdateSite/plugins/org.eclipse.ui.win32_1.9.0.jar as 
File.
	at org.eclipse.update.core.ContentReference.asFile
(ContentReference.java:173)
	at org.eclipse.update.internal.security.JarVerifier.init
(JarVerifier.java:114)
	at org.eclipse.update.internal.security.JarVerifier.verify
(JarVerifier.java:222)
	at org.eclipse.update.core.Feature.install(Feature.java:292)
	at org.eclipse.update.internal.core.SiteFile.install(SiteFile.java:69)
	at org.eclipse.update.internal.core.ConfiguredSite.install
(ConfiguredSite.java:185)
	at org.eclipse.update.internal.ui.wizards.InstallWizard.execute
(InstallWizard.java:158)
	at org.eclipse.update.internal.ui.wizards.InstallWizard.access$2
(InstallWizard.java:131)
	at org.eclipse.update.internal.ui.wizards.InstallWizard$1.run
(InstallWizard.java:59)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread
(ModalContext.java:296)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:720)
	at org.eclipse.update.internal.ui.wizards.InstallWizard.performFinish
(InstallWizard.java:70)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed
(WizardDialog.java:577)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:312)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:85)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled 
Code))
	at org.eclipse.jface.window.Window.open(Window.java:535)
	at org.eclipse.update.internal.ui.forms.DetailsForm$7.run
(DetailsForm.java:683)
	at org.eclipse.swt.custom.BusyIndicator.showWhile
(BusyIndicator.java:56)
	at org.eclipse.update.internal.ui.forms.DetailsForm.executeJob
(DetailsForm.java:676)
	at org.eclipse.update.internal.ui.forms.DetailsForm.doButtonSelected
(DetailsForm.java:703)
	at org.eclipse.update.internal.ui.forms.DetailsForm.access$11
(DetailsForm.java:691)
	at org.eclipse.update.internal.ui.forms.DetailsForm$4.widgetSelected
(DetailsForm.java:338)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:85)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:739)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:174)
	at org.eclipse.core.launcher.Main.run(Main.java:605)
	at org.eclipse.core.launcher.Main.main(Main.java:449)
Comment 1 Christophe Elek CLA 2002-05-09 18:52:00 EDT
First problem
Will revert to always throw exception instead of silently logging them.

Second problem
We can notify the user if we have a handle on the result of the download.
Downloading a missing file from an HTTP server will download an Error404 HTML
page, only when we attempt to use it do we have the error.

Comment 2 Jim des Rivieres CLA 2002-05-10 09:34:27 EDT
Re: second problem. I don't understand why you would go to the trouble of 
downloading the missing page and saving it. Just check the 
HttpURLConnection.getResponseCode to see whether everything is OK.
Comment 3 Christophe Elek CLA 2002-05-17 19:18:03 EDT
1) Fixed Error message reposting file not found [ContentReference#asFile]
2) Fixed MultiStatus issue preventing the Dialog from opening
{Utilities#newCoreException] 14685
3) Added special code if conneting is an HttpConnection
[ContentReference#getInputStream and getInputSize]
Fixed, verified in self hosting, check against next Integration build