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 49976 - Unable to Validate Project.xml
Summary: Unable to Validate Project.xml
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
Keywords: RELNOTE
Depends on:
Blocks: 47288
  Show dependency tree
Reported: 2004-10-06 02:28 UTC by Chris Webster
Modified: 2005-12-07 04:58 UTC (History)
3 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Chris Webster 2004-10-06 02:28:08 UTC
If I attempt to use the validate xml from the
files view on a project.xml file I get the error

XML validation started.

cvc-elt.1: Cannot find the declaration of element
'project'. [2] 
XML validation finished.
Comment 1 David Konecny 2004-10-06 10:18:37 UTC
To validate project.xml in IDE you have to do these steps first:

0. Make sure your IDE's proxy settings are correct if you are behind
firewall, e.g. in the Setup Wizard.

1. Open the Runtime tab.

2. Right-click XML Entity Catalogs and select Mount Catalog.

3. Use "OASIS Catalog Resolver". Enter for the URL:

I'm changing this issue to enhancement to mount this catalog by
default in next version.
Comment 2 Jesse Glick 2004-10-06 16:00:24 UTC
BTW validating a j2seproject project.xml is almost useless; there is
very little in it. By contrast, a freeform project.xml has a lot of
complex content; you can already (in 4.0) see validation errors
automatically just by editing and saving it.
Comment 3 Chris Webster 2004-10-06 17:23:25 UTC
One of the reasons for filing this issue is to be able to help with a
potential merge conflict in J2EE or generally netbeans projects. 
Comment 4 Jesse Glick 2004-10-06 17:29:17 UTC
OK, that's one of the only cases I can think of where you would care
about validation for j2seproject's.

Currently the most plausible merge conflict is two developers both
adding subprojects in parallel. Then the <references> section will
need merging.

Note that any merge conflict in nbproject/build-impl.xml can be
"resolved" by deleting that file and closing and reopening the
project, since it is not primary data and is kept in VCS only for
reasons of offline buildability.
Comment 5 Jesse Glick 2004-10-23 00:24:39 UTC
See also issue #42686.
Comment 6 Jesse Glick 2004-12-02 21:06:16 UTC
Might not get to for E, still TBD.
Comment 7 Jesse Glick 2005-01-13 19:14:40 UTC
Have working patch.
Comment 8 Jesse Glick 2005-01-13 19:18:22 UTC
Issue #22848 covered the necessary xml/catalog SPI. Oddly, it was
never properly documented in the xml/catalog Javadoc, which I will fix
(not that that Javadoc is even published currently).
Comment 9 Jesse Glick 2005-01-13 19:48:27 UTC
JJ - possible addition to release notes and/or usersguide: in 4.1 it
will be possible to validate any project.xml or private.xml (for any
kind of project) just by right-clicking the XML file (in explorer or
editor) and choosing Validate XML, in the usual way. This is in
addition to 4.0's freeform project.xml validation but with the
following differences:

- works for any kind of project/private.xml, not just freeform
project.xml (generally: for any $uri matching**, validates against $uri.xsd if that has
been published)

- works equally well on unsaved XML files

- is *not* automatic upon saving the file; must be invoked explicitly

- requires a web connection to (no offline operation)

- the new catalog appears automatically under XML Entity Catalogs, no
need to add explicitly as was
previously recommended
Comment 10 Jesse Glick 2005-01-13 21:11:51 UTC
committed   * Up-To-Date  1.18        ide/golden/deps.txt
committed   * Up-To-Date  1.622       nbbuild/build.xml
committed   * Up-To-Date  1.8         projects/projectui/build.xml
committed   * Up-To-Date  1.13       
committed   * Up-To-Date  1.52       
added       * Up-To-Date  1.1        
added       * Up-To-Date  1.1        
committed   * Up-To-Date  1.45       
Comment 11 gaucho72 2005-12-04 12:32:35 UTC
It's impossible now to use project APIs without inluding all the needed XML 
The xml/catalog needs xml/core, xml/core requires libs/xerces, etc....

So I need all this, even if I want to implement a simple project like 
described in the povray tutorial.
Comment 12 Jesse Glick 2005-12-04 17:42:50 UTC
This was fixed as intended. If you want to open an RFE in xml/something to have
a lighter-weight catalog API suitable for non-IDE applications, go ahead.
Comment 13 gaucho72 2005-12-04 22:19:54 UTC
OK, sorry for reopening this issue.

There should be an update in the NetBeans Architecture Answers for this module 
(Interfaces table).
Comment 14 Jesse Glick 2005-12-07 04:58:38 UTC
Good point:

Checking in projects/projectui/arch.xml;
/cvs/projects/projectui/arch.xml,v  <--  arch.xml
new revision: 1.9; previous revision: 1.8