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.
When project.xml of some module is broken I cannot: - build IDE - open any project in IDE This is error message from "ant build-nozip": build-init: Scanning for modules in /local/madamek/nbcvs/trunk/nb_all [nbmerge] Failed to build target: all-openide/util BUILD FAILED /local/madamek/nbcvs/trunk/nb_all/nbbuild/build.xml:3127: The following error occurred while executing this line: /local/madamek/nbcvs/trunk/nb_all/nbbuild/build.xml:3122: The following error occurred while executing this line: /local/madamek/nbcvs/trunk/nb_all/nbbuild/build.xml:264: The following error occurred while executing this line: /local/madamek/nbcvs/trunk/nb_all/nbbuild/templates/projectized.xml:23: java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence. I don's think it's appropriate error message when this error was cause: - In nb_all/serverplugins/docs/nbproject/projects.xml there was COPYRIGHT character. File is declared as UTF-8, but it really isn't in this encoding probably. Thanks to Andrei to find this out using "strace" command.
Can be fixed soon to skip that module. (If that module was needed by something else, the build may well break later anyway.) Not a top priority, though - just fix your project.xml. (Error message from Ant task reports broken file name, at least when I try it.)
I will make it nonfatal for opening the project in the IDE, but leave it as a fatal build error for the Ant task. Generally, if some module has malformed XML, the build cannot be expected to work. (For an XML parser, a misuse of the (C) char is an error just as bad as missing a closing tag or anything else.) I don't know what you were using strace for; for me this kind of error is printed by Ant, without even using -v: ---%<--- [.....] Scanning for modules in /space/src/nb_all [Fatal Error] project.xml:1:1: Content is not allowed in prolog. BUILD FAILED /space/src/nb_all/nbbuild/templates/projectized.xml:23: java.io.IOException: org.xml.sax.SAXException: Error parsing /space/src/nb_all/beans/nbproject/project.xml Content is not allowed in prolog. ---%<---
Created attachment 22813 [details] Standard output of ant
Created attachment 22814 [details] Verbose aoutput of ant
I attached standard and verbose output of "ant build-nozip" command. There is no information which file is broken. For me (according to Bug Priority Guidelines) it's still P1 - there is no workaround. If I would see reasonable error message with broken file location, this issue would not exist. Anyway, I don't care if it's P1 or P5 if it is fixed :-)
Jesse, the project.xml file which started all this is here: http://serverplugins.netbeans.org/nonav/source/browse/*checkout*/serverplugins/docs/nbproject/project.xml?rev=1.5&content-type=text/plain The XML is well-formed and valid, but claims to be UTF-8-encoded, which it is probably not. When the parseprojectxml task processes this file, it stops with the message that Martin posted in the description, and that message gives no clue what is the problem or how to fix it. Making in non-fatal when opening the project in the IDE seems a good idea. But the build should IMHO immediately fail, and it should be clear from the error message what went wrong (or at least in which file). In this case, displaying the file name should be enough.
Regarding the priority - Martin spent the whole day before he and Andrei finally figured out what was wrong and which file caused it. This was not a 10 minute fix. Hence, I think the P1 priority is justified. Thanks.
It seems that Yarda patched ModuleListParser to include filename info for SAXException's (the common case) but not for IOException's (relatively rare). Easy enough to fix.
committed * Up-To-Date 1.7 apisupport/project/src/org/netbeans/modules/apisupport/project/universe/ModuleList.java committed * Up-To-Date 1.15 nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java