Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 252393 - [update] Error reading site digest message should reference real site
Summary: [update] Error reading site digest message should reference real site
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Simon Kaegi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 222680 249308 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-28 11:29 EDT by Simon Kaegi CLA
Modified: 2009-04-24 21:54 EDT (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 Simon Kaegi CLA 2008-10-28 11:29:22 EDT
I get the following stack when I access a site with an invalid digest.zip.


!ENTRY org.eclipse.equinox.p2.updatesite 4 0 2008-10-28 11:17:56.390
!MESSAGE Error reading site digest C:\DOCUME~1\SIMONK~1\LOCALS~1\Temp\digest5103
5.zip.
!STACK 0
java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at org.eclipse.equinox.internal.p2.updatesite.DigestParser.parse(DigestP
arser.java:76)
        at org.eclipse.equinox.internal.p2.updatesite.UpdateSite.loadFeaturesFro
mDigest(UpdateSite.java:375)
        at org.eclipse.equinox.internal.p2.updatesite.UpdateSite.loadFeatures(Up
dateSite.java:348)
        at org.eclipse.equinox.internal.p2.updatesite.RemoteFeaturesAction.perfo
rm(RemoteFeaturesAction.java:41)
        at org.eclipse.equinox.internal.p2.updatesite.RemoteUpdateSiteAction.per
form(RemoteUpdateSiteAction.java:43)
        at org.eclipse.equinox.p2.publisher.Publisher.publish(Publisher.java:134
)
        at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadat
aRepositoryFactory.generateMetadata(UpdateSiteMetadataRepositoryFactory.java:90)

        at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadat
aRepositoryFactory.initializeRepository(UpdateSiteMetadataRepositoryFactory.java
:77)
        at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadat
aRepositoryFactory.load(UpdateSiteMetadataRepositoryFactory.java:54)
        at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositor
yManager.factoryLoad(MetadataRepositoryManager.java:54)
        at org.eclipse.equinox.internal.p2.core.helpers.AbstractRepositoryManage
r.loadRepository(AbstractRepositoryManager.java:587)
        at org.eclipse.equinox.internal.p2.core.helpers.AbstractRepositoryManage
r.loadRepository(AbstractRepositoryManager.java:552)
        at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositor
yManager.loadRepository(MetadataRepositoryManager.java:85)
        at org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepos
itoryManager.loadAll(QueryableMetadataRepositoryManager.java:140)
        at org.eclipse.equinox.internal.p2.ui.dialogs.DeferredFetchFilteredTree$
9.run(DeferredFetchFilteredTree.java:384)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


This particular error occured when we ended up downloading:
http://andrei.gmxhome.de/eclipse/digest.zip

Which return a 200 OK and then a 0 length zip file.

--
The error message is a little harsh. We should do a few things here.
1) only try to download a digest.zip if the site.xml references it.
2) log a more minimal message
3) reference the URL from where we did the actual download instead of the temp location.
Comment 1 Pascal Rapicault CLA 2008-10-28 17:33:43 EDT
Is this a regression since 3.4?
Comment 2 Simon Kaegi CLA 2008-10-28 17:49:54 EDT
No. This is one of those cases where the webserver doesn't give us a 404 so we log the error for a corrupt zip. The typical case where we get a 404 we handle correctly. We really should only look for a digest.zip if the site.xml references it in which case I think we would be covered for the most part but still we need to at least log the site that gave us the bad zip.
Comment 3 Pascal Rapicault CLA 2008-12-12 23:23:36 EST
*** Bug 249308 has been marked as a duplicate of this bug. ***
Comment 4 Pascal Rapicault CLA 2008-12-12 23:24:52 EST
*** Bug 222680 has been marked as a duplicate of this bug. ***
Comment 5 Pascal Rapicault CLA 2008-12-12 23:26:00 EST
*** Bug 222680 has been marked as a duplicate of this bug. ***
Comment 6 Pascal Rapicault CLA 2009-02-20 11:54:48 EST
We at least need to improve the error message to show the source location. See also bug 228198 for not getting the digest.zip
Comment 7 Simon Kaegi CLA 2009-04-24 21:54:49 EDT
Fixed in HEAD.