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.
This issue is a side-effect of fixing 92875 and 91333. In brief, CC now looks at runtime catalog schemas if they are not found in the project catalog. When it comes to web.xml kind of files, we try to do the same. <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> ... </web-app> The file http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd has been registered in the catalog but the content is DTD and we get an NPE. java.lang.NullPointerException at org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent.resolveMod elSource(AbstractDocumentComponent.java:706) at org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent._resolveMo del(AbstractDocumentComponent.java:746) at org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent.resolveMod el(AbstractDocumentComponent.java:738) at org.netbeans.modules.xml.schema.model.impl.IncludeImpl.resolveReferen cedModel(IncludeImpl.java:77) at org.netbeans.modules.xml.schema.model.impl.SchemaModelImpl.resolve(Sc hemaModelImpl.java:157) at org.netbeans.modules.xml.schema.model.impl.SchemaModelImpl.resolve(Sc hemaModelImpl.java:142) at org.netbeans.modules.xml.schema.model.impl.SchemaModelImpl.resolve(Sc hemaModelImpl.java:113) at org.netbeans.modules.xml.schema.model.impl.GlobalReferenceImpl.get(Gl obalReferenceImpl.java:52) at org.netbeans.modules.xml.schema.model.impl.GlobalReferenceImpl.get(Gl obalReferenceImpl.java:34) at org.netbeans.modules.xml.axi.impl.Util.getSchemaType(Util.java:146) at org.netbeans.modules.xml.axi.impl.ElementImpl.populateChildren(Elemen tImpl.java:265) .... I think we should return either a null or status of the model as Invalid.
--> To Nam
Created attachment 37848 [details] patch in xam
Created attachment 37849 [details] patch in xdm
Created attachment 37850 [details] patch in schema/api
The issue is that XDMAccess does not check for case that XDM returns DOM Document with null element for a non-XML content. The fix is simply check for document element to avoid calling createRootComponent() with null argument. Checked in trunk. Patches in relesae551 attached.
Reviewed by Ayub. Fix checked in release551.
Works, the unit test is now part of the continuous build.