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.
Summary: | org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'compilation-unit'. One of '{"http://www.netbeans.org/ns/freeform-project-java/4":compilation-uni | ||
---|---|---|---|
Product: | projects | Reporter: | MackSix |
Component: | Ant Freeform | Assignee: | Milos Kleint <mkleint> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | jlahoda, MackSix, mmirilovic, musilt2, rhlrx85 |
Priority: | P2 | Keywords: | REGRESSION |
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 204411 |
Attachments: |
stacktrace
Project to use for reproduction. stacktrace |
Description
MackSix
2013-10-07 16:16:20 UTC
Created attachment 140865 [details]
stacktrace
1. Open attached free-form project. 2. Open context menu and go to Properties >> Java Source Classpath >> Java Platform and change JDK platform from 1.8 to 1.7. 3. This exception is thrown. 4. Open context menu again and JDK plataform is set back to 1.8. 5. Go to Java Source and change the Source Level to 1.7 or 1.6. 6. This exception is thrown. Workaround: None that I know of. Product Version: NetBeans IDE 7.4 (Build 201310012201) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Created attachment 140866 [details]
Project to use for reproduction.
It's reproducible just by changing project source level to 1.8. This forces use of http://netbeans.org/ns/freeform-project-java/4.xsd; any further downgrade of source level throws exception. Workaround is easy: change you project.xml manually: change <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4"> to <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3"> and <source-level>1.8</source-level> to <source-level>1.7</source-level> How am I supposed to change Java Platform to 1.6? I can't even change Java Platform from one version of JDK 7 to another now after changing the source level entries in project xml. I was able to do it a couple of times and now it throws the exception and won't change. I rebooted NetBeans and it now allows me to change Java Platforms between different JDK 7 versions again. (In reply to Tomas Danek from comment #4) > It's reproducible just by changing project source level to 1.8. This forces > use of http://netbeans.org/ns/freeform-project-java/4.xsd; any further > downgrade of source level throws exception. > > Workaround is easy: change you project.xml manually: > change > <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4"> > to > <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3"> > > and > <source-level>1.8</source-level> > to > <source-level>1.7</source-level> Plus you may have to Reboot NetBeans to allow the Java Platform to be changed from 1.8 to 1.7, between 1.7 versions or a 1.6 version. If I have JDK Platform set to JDK1.6.0_45 and try to change source level to 1.5, it throws this exception too. org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'compilation-unit'. One of '{"http://www.netbeans.org/ns/freeform-project-java/3":compilation-unit}' is expected. jlahoda: there's an duplicate issue that you had assigned to yourself? I can't believe this isn't a patch1 candidate. ;) Created attachment 142295 [details]
stacktrace
This is a FreeForm Java project. I was trying to add and remove jars from the Project Properties src class path.
The last time I did this, it forgot my new settings and reverted back to the old ones.
This was more or less the first thing I did when I started up NetBeans. The project was already opened.
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=204411 Integrated into 'releases/release74', will be available in build *201312042201* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/3620babf9fb6 User: Milos Kleint <mkleint@netbeans.org> Log: #236846 once negotiated what namespace is necessary and what is used, always consistently use the existing namespace when creating elements verified in patch 2 |