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.
Created attachment 93822 [details] sample ear project -have attached ear -open deployable archive project wizard, fill in required fields and set GF-v3 as the target server -press Finish => project is not created and wizard says: cvc-complex-type.2.1: Element 'source-jar' must have no character or element information item [children], because the type's content type is empty ide log says: FINE [org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton]: parsed document FINE [org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton]: got document element FINE [org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton]: got namespace http://www.netbeans.org/ns/project/1 INFO [org.openide.WizardDescriptor] org.xml.sax.SAXParseException: cvc-complex-type.2.1: Element 'source-jar' must have no character or element information item [children], because the type's content type is empty. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) ... at javax.xml.validation.Validator.validate(Validator.java:127) at org.openide.xml.XMLUtil.validate(XMLUtil.java:496) at org.netbeans.modules.project.ant.ProjectXMLCatalogReader.validate(ProjectXMLCatalogReader.java:152) at org.netbeans.spi.project.support.ant.AntProjectHelper.saveXml(AntProjectHelper.java:333) Caused: java.io.IOException: cvc-complex-type.2.1: Element 'source-jar' must have no character or element information item [children], because the type's content type is empty. at org.netbeans.spi.project.support.ant.AntProjectHelper.saveXml(AntProjectHelper.java:336) at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:613) at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:106) at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:144) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:439) at org.netbeans.api.project.ProjectManager$6.run(ProjectManager.java:644) at org.netbeans.api.project.ProjectManager$6.run(ProjectManager.java:633) at org.openide.util.Mutex.writeAccess(Mutex.java:433) at org.netbeans.api.project.ProjectManager.saveProject(ProjectManager.java:633) at org.netbeans.modules.j2ee.archive.wizard.DeployableWizardIterator.instantiate(DeployableWizardIterator.java:234) at org.netbeans.modules.j2ee.archive.wizard.DeployableWizardIterator.instantiate(DeployableWizardIterator.java:154) at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1018) ...
Do we still want this functionality in the IDE?
Jesse: it looks like this commit is the root cause for the exception... http://hg.netbeans.org/web-main/rev/a5fd615123b9 Can you give me a bit of background on why the change was made? is there an issue that I can look at to get this info? Should I just revert this change?
(In reply to comment #2) > Can you give me a bit of background on why the change was made? I think the commit comment says it all. The former schema declaration <xsd:element name="source-jar" minOccurs="1" maxOccurs="1"/> looks like it means <source-jar/> must be an empty element, but Xerces interprets this as meaning that *anything* may be present inside of it, which was surely not the intent. The new schema declaration <xsd:element name="source-jar" minOccurs="1" maxOccurs="1"> <xsd:complexType/> </xsd:element> expressly forbids any content, which Xerces does honor. (In the unusual case that you really do want to permit any child element, this can be expressed using <xsd:any/>, as for example http://www.netbeans.org/ns/project/1.xsd does.) > Should I just revert this change? No. You should either fix the schema if the schema does not reflect your expectations of what a project.xml should contain, by specifying permitted child elements or text content; or fix DeployableWizardIterator (or whatever else is modifying project.xml), if it is in fact generating incorrect data.
Integrated into 'main-golden', will be available in build *201003260201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/2b9d8ec30eb2 User: Vince Kraemer <vkraemer@netbeans.org> Log: #180240: cannot create a deployable archive project
in the trunk