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.
NB Build:NetBeans IDE Build 200807310201 JDK Build:jdk1.6.0 OS: Microsoft Windows Server 2003 Service Pack1(I couldn't find Win 2003 in the OS list, so I mentioned as Win 2000) Steps: -Install NB-Dev IDE -Select File>New Project>JAVA EE>EnterPrise Application>Next>Next>Finish ISSUE: On selecting FINISH button, it shows message in the application creation wizard "cvc-complex-type.4: Attribute 'id' must appear on element 'root'" and its incomplete. -Attaching screen shot and message .log for this issue.
Created attachment 66266 [details] Message.log
Created attachment 66267 [details] screen shot
Created attachment 66268 [details] Correct screen shot
I just tried build 200808021401... and could not replicate the behavior. I tested on Vista, though...
Has this worked for you in older dev builds? If yes, do you remember build number of your previous dev build? For a while now dev build is checking validity of project.xml file during project opening. In your case newly generated WAR project does not seem to have required "id" attribute on "root" tag (child of "source-roots" tag). Which is strange because looking at the code the tag and attribute are always generated with fixed value. Does creation of other project types (J2SE, EJB, AppClient) work fine or not? The IDE.log file shows you are using "1.6.0-b105" version of JDK. Could you try to reproduce the problem on newer JDK like 1.6.0_06 please? Could you also please try creating Web App project individually and not as part of EAR proj? Thanks.
NB build:netbeans-trunk-nightly-200807300201,netbeans-trunk-nightly-200807311401,netbeans-trunk-nightly-200808010201 and netbeans-trunk-nightly-200808021401. JDK:jdk1.6.0_06 OS:Microsoft Windows Server 2003 Service Pack1 According to your suggestion i installed jdk1.6.0_06 and tried with above mentioned NB builds. Now I am able to create all types of project(Web, EAR, EJB, App-Client and JAVA Applications) with out hitting any issues.
I thought that might be the case as error itself does not make any sense and must be a problem in XML Schema validator.
This issue happens very often in functional tests we have. Jindro, can you add some links to results to this issue, please? Thanks. see also issue 142230
Please file new issue for your test problem unless the error message is "cvc-complex-type.4: Attribute 'id' must appear on element 'root'" Validation of project.xml can fail for different reasons (some of them recently fixed) and these are unique often unrelated issues. Nothing mentioned in issue 142230 is relevant to this problem. As I said earlier XML produced in this instance is valid if newer JDK is used - reporter was running 1.6.0-b105 which I think is quite dated.
Also problems related to project.xml validation should not be random - the same test case on the same platform should always fail or always pass.
hmmm, comparing two logs from tests on one machine using same JDK just now: >System Info: Product Version = NetBeans Platform Dev (Build 20080801021000) Operating System = SunOS version 5.10 running on sparc Java; VM; Vendor = 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19; Sun Microsystems Inc. Runtime = Java(TM) SE Runtime Environment 1.6.0_05-b13 tests are starting by creation of a new web project - this happens in setup method iff a project required by tests does not exist yet and info about this is being logged - look for: "INFO [org.netbeans.modules.ws.qaf.WebServicesTestBase]: Creating project in:" in one of the log, I can see: "cvc-complex-type.4: Attribute 'id' must appear on element 'root'" in the other I can't. So the question is: Why project creation fails in some suites and not in the others? note - hardware & software configuration is the same, the way how a project is being created too. (it succeed in websvc.kit, webvalidation tests, it does not succeed websvc.restkit, web.jsf) re jdk1.6.0-b105: "1.6: DOM level 1 documents cannot be validated with a Schema, works with 1.5"[1] has been fixed in jdk1.6.0_02 according to Java SE release notes[2] [1]: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6531160 [2]: http://java.sun.com/javase/6/webnotes/ReleaseNotes.html#160_02
Created attachment 66536 [details] log with failure
Created attachment 66537 [details] log with success (test fails a bit later)
Thanks Lukas, this one is quite tricky. I know the cause but I'm not sure what's the conclusion. Adding Jesse as he may know better. I was able to reproduce XML schema validation error cvc-complex-type.4: Attribute 'id' must appear on element 'root' when running web.jsf functional tests. It is false alarm because project.xml does contain id attribute on root element. Why web.jsf test suite is failing and other suites pass? Because web.jsf has ide10/modules/org-netbeans-libs-xerces.jar on its classpath and somehow (?) this parser gets preference over JDK's one. But (to make it more complicated) only on JDK 1.6 - on 1.5 everything seems to work fine. Compare following: * attached restkit.log.txt contains false validation exception which is coming from org.apache.xerces.impl.xs.XMLSchemaValidator * wskit.log.txt on the other hand contains valid validation exception but that one is coming from JDK's com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator Fixing classpath of web.jsf functional tests should resolve the problem (although I'm not sure how because xerces is added to classpath automatically as a resolution of some other module dependencies). I wonder though what's the proper fix and how to make sure the same problem will not happen somewhere else again.
Only testing is impacted not end user -> P3.
Likely the same as issue #140905, though due to using a buggy standalone version of Xerces rather than using a JDK bundling a buggy embedded version of Xerces. Probably needs centralized fix in either XMLUtil.validate or ProjectXMLCatalog. *** This issue has been marked as a duplicate of 140905 ***
I tried to avoid dep. on xercers in some tests in 78036fea39c4 for now
Integrated into 'main-golden', available in build *200808071401* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/78036fea39c4 User: Lukas Jungmann <jungi@netbeans.org> Log: IZ #142545: remove xerces from tests cp