Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 102457

Summary: Update manager fails with two-place feature versions
Product: [Eclipse Project] Platform Reporter: Leif Frenzel <lfrenzel>
Component: Update (deprecated - use Eclipse>Equinox>p2)Assignee: Platform-Update-Inbox <platform-update-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: elias, mik.kersten
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Eclipse projects with the scenario described in the PR
none
corrected sample projects none

Description Leif Frenzel CLA 2005-07-01 06:18:13 EDT
Some plugin authors use an incomplete version number (like 1.0 instead of 
1.0.0). I'm not sure whether this is permissible (i.e. how 'hard' is the 
requirement of a three-place version), but at least PDE handles it without 
complaint, and so does the platform runtime. But putting such a feature on an 
update site can cause problems in some cases.

For instance, if there is a feature f that has in the feature.xml version 1.0, 
the site.xml generated by PDE looks like:

<site>
   <feature url="features/f_1.0.jar" id="f" version="1.0"/>
</site>

The feature jar created by the PDE Export wizard has f_1.0.0.jar. 
If the user corrects this into f_1.0.jar, like it says in the site.xml, the
Update Manager fails to install from the site, because it seems to implicitely
correct the version to 1.0.0 and then cannot find f_1.0.0.jar.
Comment 1 Leif Frenzel CLA 2005-07-01 06:19:53 EDT
Created attachment 24259 [details]
Eclipse projects with the scenario described in the PR
Comment 2 Leif Frenzel CLA 2005-07-05 05:26:31 EDT
Actually, the sample was not yet quite sufficient to reproduce the problem. The
feature.xml must specify the precise version (1.0), and both archives must be
renamed to display the version that is in the manifest. Attaching corrected sample.

The error message in the workspace is then

!ENTRY org.eclipse.update.core 4 0 2005-07-05 11:19:29.709
!MESSAGE Unable to retrieve remote reference
"file:/T:/projects/workspace.yoxos/s/plugins/p_1.0.0.jar".
[T:\projects\workspace.yoxos\s\plugins\p_1.0.0.jar (Das System kann die
angegebene Datei nicht finden)]
!STACK 0
java.io.FileNotFoundException: T:\projects\workspace.yoxos\s\plugins\p_1.0.0.jar
(Das System kann die angegebene Datei nicht finden)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at java.io.FileInputStream.<init>(Unknown Source)
	at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
	at java.net.URL.openStream(Unknown Source)
	at
org.eclipse.update.internal.core.FileResponse.getInputStream(FileResponse.java:27)
	at
org.eclipse.update.core.ContentReference.getInputStream(ContentReference.java:146)
	at
org.eclipse.update.core.FeatureContentProvider.asLocalReference(FeatureContentProvider.java:250)
	at
org.eclipse.update.internal.core.FeaturePackagedContentProvider.getPluginEntryArchiveReferences(FeaturePackagedContentProvider.java:165)
	at
org.eclipse.update.internal.operations.UpdateUtils.downloadFeatureContent(UpdateUtils.java:627)
	at
org.eclipse.update.internal.ui.wizards.InstallWizard2.download(InstallWizard2.java:405)
	at
org.eclipse.update.internal.ui.wizards.InstallWizard2.access$3(InstallWizard2.java:394)
	at
org.eclipse.update.internal.ui.wizards.InstallWizard2$4.run(InstallWizard2.java:350)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Comment 3 Leif Frenzel CLA 2005-07-05 05:27:30 EDT
Created attachment 24340 [details]
corrected sample projects
Comment 4 John Arthorne CLA 2009-06-18 17:19:34 EDT
This is a mass update of Platform Update bugs that have had no activity in three years. Platform Update was replaced in Eclipse 3.4 (2008) by a new provisioning system called Equinox p2. If this bug or enhancement is not already addressed in p2 please enter a new bug report against p2 (RT > Equinox > p2). If you still want to see this bug addressed in the deprecated Platform Update component, please reopen this bug. Patches welcome.