Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335414 - Site parsing errors should mention the URL of the site being parsed and erroneous bit of XML for easier debuggery
Summary: Site parsing errors should mention the URL of the site being parsed and erron...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 21:40 EST by Nick Boldt CLA
Modified: 2011-01-27 14:30 EST (History)
0 users

See Also:


Attachments
patch (9.54 KB, patch)
2011-01-26 15:23 EST, DJ Houghton CLA
no flags Details | Diff
patch (11.25 KB, patch)
2011-01-27 14:29 EST, DJ Houghton CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Boldt CLA 2011-01-25 21:40:05 EST
So, I have a half-dozen update sites in my Eclipse.

When I check for updates, one of them throws this message into my log:

!ENTRY org.eclipse.equinox.p2.core 2 0 2011-01-25 13:37:48.382
!MESSAGE Error parsing composite repository
!SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2011-01-25 13:37:48.382
!MESSAGE Error at line 3, column 156: Missing required attribute in "repository": version

(Actually, I get 5 similar errors on line 3 at different column markers from various sites who've made this similar mistake.)

Anyway, after some deduction and process-of-elimination, I managed to figure out that this is due to http://m2eclipse.sonatype.org/sites/m2e-extras/compositeArtifacts.xml and/or http://m2eclipse.sonatype.org/sites/m2e-extras/compositeContent.xml

But the effort required to throw guess URLs at a server for each of the update sites from which I'm getting updates is significantly more than the effort that could be used to spit out an error message to simply tell the user:

 "The site at URL {0} is missing the attribute {1} in node {2}: {3}."

where:

 {0} -> URL
 {1} -> version
 {2} -> repository
 {3} -> line contents

Then, geeks like me could report the problem to the site's owner more easily and get stuff like this fixed.

...

Of course a warning message like this, which doesn't reflect any actual impedance to installation from the site (since the version is evidently assumed to be "1" or something), could also simply be suppressed entirely.
Comment 1 DJ Houghton CLA 2011-01-26 15:23:40 EST
Created attachment 187680 [details]
patch

Agreed. Here is an initial patch. 
Initial tests locally look good. 
I haven't modified the code which handles legacy update sites yet.
Comment 2 DJ Houghton CLA 2011-01-27 14:29:32 EST
Created attachment 187764 [details]
patch

Updated patch.
Comment 3 DJ Houghton CLA 2011-01-27 14:30:07 EST
Patch released to HEAD.