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 229015

Summary: org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'explicit-platform'. One of '{"http://www.netbeans.org/ns/j2se-project/3":web-service-clients, "h
Product: javafx Reporter: Petr Somol <psomol>
Component: ProjectAssignee: Martin Kozeny <mkozeny>
Status: NEW ---    
Severity: normal CC: David290, davideconsonni, jaisondaniel, MackSix, nacee
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
See Also: https://netbeans.org/bugzilla/show_bug.cgi?id=225915
Issue Type: DEFECT Exception Reporter: 189003
Attachments: stacktrace
project in which the bug appears
stacktrace
stacktrace

Description Petr Somol 2013-04-25 13:55:34 UTC
Build: NetBeans IDE Dev (Build 20130419-c3d43c74c331)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
OS: Windows 7

User Comments:
psomol: Clicked Resolve on project with incorrectly defined platform and source and target level (active.platform=default_platform, javac.source=1.8, javac.target=1.8), NB run on JDK7u21. In the Resolve dialog just pressed OK to confirm change to existing 1.8 platform, then the NPE appeared.




Stacktrace: 
org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'explicit-platform'. One of '{"http://www.netbeans.org/ns/j2se-project/3":web-service-clients, "http://www.netbeans.org/ns/j2se-project/3":source-roots}' is expected.
   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:0)
   at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:0)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:0)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:0)
   at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:0)
   at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:0)
Comment 1 Petr Somol 2013-04-25 13:55:36 UTC
Created attachment 133805 [details]
stacktrace
Comment 2 Petr Somol 2013-04-25 14:37:59 UTC
Created attachment 133809 [details]
project in which the bug appears

Attaching the project where on opening the resolver leads to this NPE. The problem is more likely to be in project infrastructure instead of xml, more precisely in project.xml contents handling. The attached project has had project.properties manually modified as part of unrelated debugging effort - thus it may not be in a state reachable through NB UI.
Comment 3 MackSix 2013-07-07 08:08:37 UTC
Created attachment 136775 [details]
stacktrace

Switching a free-form project from JDK 1.7 to JDK 1.6 in Project Properties>>Java Sources Classpath
Comment 4 Exceptions Reporter 2013-07-07 08:08:42 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=189003
Comment 5 MackSix 2013-07-07 14:26:37 UTC
Created attachment 136777 [details]
stacktrace

Viewing Project Properties>>Java Sources. Did not change anything and clicked OK button.
Comment 6 MackSix 2013-07-07 21:50:27 UTC
The Free-Form project was created from this jEdit 5.1pre1 source:

http://sourceforge.net/projects/jedit/files/jedit-devel/5.1pre1/jedit5.1pre1source.tar.bz2/download

I has been trying Inspect & Transform>>If-Else statements should use braces ad refactored and then Undo. I believe this messed something up that caused this because after I deleted the cache directory, I never had this problem again.

This issue occurred after the I&T refactor and Undo and is probably related:

https://netbeans.org/bugzilla/show_bug.cgi?id=225915
Comment 7 Martin Kozeny 2014-07-25 16:38:04 UTC
Reassigning to default owner. Issue still valid on:

Product Version: NetBeans IDE Dev (Build 201407230001)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.5.0-51-generic running on amd64; UTF-8; en_US (nb)

Connected or maybe the same bug as https://netbeans.org/bugzilla/show_bug.cgi?id=232275.
Comment 8 Martin Kozeny 2014-07-30 13:12:12 UTC
*** Bug 244369 has been marked as a duplicate of this bug. ***