This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 57634 - Validation errors in www/www/updates/
Summary: Validation errors in www/www/updates/
Status: RESOLVED FIXED
Alias: None
Product: updatecenters
Classification: Unclassified
Component: AU Masters (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: rnovak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-07 18:13 UTC by Jesse Glick
Modified: 2007-11-05 16:31 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-04-07 18:13:55 UTC
Just noticed that www/www/updates/41beta_1.9_.xml has numerous XML validation
errors according to its DTD; seems it is more error than not! For that matter, I
cannot find a single XML file in this dir which *does* validate without errors.

It is unacceptable to publish *any file* in www/www/updates/**/*.xml which fails
XML validation; any violation should be treated as a P2 defect to be corrected
before publishing a release, either manually or by fixing the tools which
generated malformed content. (And the tools which create these files should do a
sanity validation before exiting and report an error if the validation fails.)

The DTDs exist for a reason. They specify what the autoupdate client in a given
IDE build is prepared to accept from the server. If it is given malformed input,
its behavior is not likely to be good. (Ideally it would reject invalid input
immediately so that the problem never progresses this far.)
Comment 1 rnovak 2005-04-08 14:51:24 UTC
I'll take care of this issue.
Tools that generate UC catalogs stored in www/www/updates/**/*.xml need to be
enhanced to produce XML files that do validate without errors. Following
enhancements need to be done:

1. Catalogs are generated from modules NBMs, therefore info.xml files need to be
validated before they are used for catalog generating and NBMs with invalid
info.xml should be rejected.

2. Catalogs have to be generated according to the DTD version valid for target
NB release. Right now DTD have to be set manually that is confusing.

3. Catalogs should be validated before they are uploaded to the UC
Comment 2 rnovak 2005-12-02 09:27:40 UTC
will be fixed for promo G
Comment 3 rbalada 2007-05-13 22:06:03 UTC
Roberte,

what's status of this issue?
Comment 4 Jesse Glick 2007-05-17 15:06:43 UTC
Probably dupe of issue #37376 (or vice versa).
Comment 5 Michal Zlamal 2007-09-25 14:11:20 UTC
Is this still valid?
Comment 6 Jesse Glick 2007-09-26 17:07:23 UTC
Yes this is still valid. Picking the first XML file I saw at random, 60m10_1.22_.xml, and validating:

XML validation started.

Checking file:/space/src/nb_all/www/www/updates/60m10_1.22_.xml...
Referenced entity at "http://www.netbeans.org/dtds/autoupdate-catalog-2_5.dtd".
Document root element "module_updates", must match DOCTYPE root "autoupdate_catalog". [6] 
Element type "feature" must be declared. [8] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [11] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [15] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [19] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [23] 
Element type "feature" must be declared. [26] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [29] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [33] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [37] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [41] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [45] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [49] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [53] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [57] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [61] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [65] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [69] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [73] 
Attribute "OpenIDE-Module-Build-Version" must be declared for element type "manifest". [137] 
Too many errors, stopping further checking.
XML validation finished.

Comment 7 Antonin Nebuzelsky 2007-10-31 16:27:04 UTC
I think we should ensure that new catalogs satisfy the validation now!

Robert, you should do something with this open P2 now. Can you fix it for new catalogs?
Comment 8 rnovak 2007-10-31 16:31:16 UTC
I'm taking care of it and making it my top priority.
Comment 9 rnovak 2007-11-02 16:11:24 UTC
catalog.xml is failing to validate, because some of modules contain manifest attributes:
OpenIDE-Module-Friends or OpenIDE-Module-Build-Version
Jirka, any suggestions ? Can wee add these attributes to the catalog DTD ?
Comment 10 Jesse Glick 2007-11-02 18:26:36 UTC
OpenIDE-Module-Friends and OpenIDE-Module-Friends are not needed in the catalog DTD. They are manifest attributes which
are irrelevant to AU and should not be generated in Info.xml or catalogs.
Comment 11 rnovak 2007-11-05 12:27:50 UTC
Ah, I see. But it means, that info.xml for these modules can not be validated neither against its DTD. Attributes like
OpenIDE-Module-Friends or OpenIDE-Module-Friends should not appear in info.xml neither.
I will fix my tool for generating of UC catalogs from modules NBMs to include only allowed attributes. But I suggest to
fix also task that generates module info.xml file.
Comment 12 Jesse Glick 2007-11-05 15:55:03 UTC
I'm not sure I understand the last comment. I just ran

ant -f ant/freeform/build.xml nbm

in trunk sources and inspected the generated Info/info.xml. It was valid acc. to DTD, and had no OpenIDE-Module-Friends
attribute in <manifest>.
Comment 13 rnovak 2007-11-05 16:31:39 UTC
Fixed for NB 6.0 Beta2 (and further) Update Centers.