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 060831_2 (JDK 1.6 Beta 2) To reproduce the bug: - create a new schema; - delete the schema from the project. 'The document could not be loaded' warning appears.
The issue is in the AbstractModelFactory.getModels() method, which should catch FileNotFoundException and mark the model to be removed from the cache. It is not possible for the tools layer to solve this problem, changing component, re-assigning. Below is a stack trace just prior to the point where the exception occurs (which happens on the RequestProcessor thread, and that has a useless stack trace). Stack for thread Default RequestProcessor: * [1] org.openide.text.CloneableEditorSupport.prepareDocument (CloneableEditorSupport.java:513), pc = 70 [2] org.openide.text.CloneableEditorSupport.openDocumentImpl (CloneableEditorSupport.java:672), pc = 43 [3] org.openide.text.CloneableEditorSupport.openDocumentCheckIOE (CloneableEditorSupport.java:654), pc = 1 [4] org.openide.text.CloneableEditorSupport.openDocument (CloneableEditorSupport.java:649), pc = 8 [5] org.netbeans.modules.xml.retriever.catalog.Utilities._getDocument (Utilities.java:520), pc = 62 [6] org.netbeans.modules.xml.retriever.catalog.Utilities.access$000 (Utilities.java:85), pc = 1 [7] org.netbeans.modules.xml.retriever.catalog.Utilities$1.getLookup (Utilities.java:616), pc = 6 [8] org.openide.util.lookup.SimpleProxyLookup.checkLookup (SimpleProxyLookup.java:55), pc = 4 [9] org.openide.util.lookup.SimpleProxyLookup.lookup (SimpleProxyLookup.java:116), pc = 1 [10] org.netbeans.modules.xml.xdm.xam.XDMAccessProvider.getModelSourceKey (XDMAccessProvider.java:64), pc = 7 [11] org.netbeans.modules.xml.xam.AbstractModelFactory.getKey (AbstractModelFactory.java:62), pc = 10 [12] org.netbeans.modules.xml.xam.AbstractModelFactory.getModels (AbstractModelFactory.java:139), pc = 82 [13] org.netbeans.modules.xml.xam.AbstractModelFactory.getAllModels (AbstractModelFactory.java:122), pc = 61 [14] org.netbeans.modules.xml.xam.AbstractModelFactory.access$000 (AbstractModelFactory.java:41), pc = 0 [15] org.netbeans.modules.xml.xam.AbstractModelFactory$1.run (AbstractModelFactory.java:102), pc = 0 [16] org.openide.util.RequestProcessor$Task.run (RequestProcessor.java:499), pc = 15 [17] org.openide.util.RequestProcessor$Processor.run (RequestProcessor.java:932), pc = 236
Tihs is a resolver issue. Utilities.getModelSource try to load document when the dataobject primary file is being deleted. I had discussion with Chris about this fix. Reassign to Chris.
Fixed by checking DataObject.isValide in retriever utililties getModelSource and _getDocument. /cvs/xml/retriever/src/org/netbeans/modules/xml/retriever/catalog/Attic/Utilities.java,v <-- Utilities.java new revision: 1.1.2.13; previous revision: 1.1.2.12
Fixed.
Verified in build 060910.