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.
Reproduced in build 060723. To reproduce the bug: - create a 'newpo' schema; - switch to Source view; - remove close tag of 'purchaseOrder' element; - invoke 'Validate XML'. Exception: java.lang.IllegalStateException: The model is not initialized or is broken. at org.netbeans.modules.xml.xdm.XDMModel.checkStableOrParsingState(XDMModel.java:810) at org.netbeans.modules.xml.xdm.XDMModel.getDocument(XDMModel.java:678) at org.netbeans.modules.xml.xdm.xam.XDMAccess.getContainingElement(XDMAccess.java:307) at org.netbeans.modules.xml.xdm.xam.XDMAccess.getContainingElement(XDMAccess.java:63) at org.netbeans.modules.xml.xam.dom.AbstractDocumentModel.findComponent(AbstractDocumentModel.java:346) at org.netbeans.modules.xml.xam.spi.XsdBasedValidator$Handler.logValidationErrors(XsdBasedValidator.java:244) at org.netbeans.modules.xml.xam.spi.XsdBasedValidator$Handler.logValidationErrors(XsdBasedValidator.java:256) at org.netbeans.modules.xml.schema.model.validation.SchemaXsdBasedValidator.validate(SchemaXsdBasedValidator.java:71) at org.netbeans.modules.xml.xam.spi.XsdBasedValidator.validate(XsdBasedValidator.java:78) at org.netbeans.modules.xml.xam.spi.Validation.validate(Validation.java:73) at org.netbeans.modules.xml.validation.ValidationOutputWindowController.validate(ValidationOutputWindowController.java:59) at org.netbeans.modules.xml.validation.ValidateXMLCookieImpl.validateXML(ValidateXMLCookieImpl.java:50) at org.netbeans.modules.xml.tools.actions.ValidateAction$RunAction.run(ValidateAction.java:95) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
If the underlying model state is not well formed, then the position finder should not be invoked. Please change the XsdBasedValidator to reflect this usage.
Added check to see whether model is broken and if so validation prints broken model message.
Verified in build060724.