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.

Bug 84028 - Redundant warning after a schema is deleted from a project
Summary: Redundant warning after a schema is deleted from a project
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: XAM (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-01 13:45 UTC by Andrei Chistiakov
Modified: 2006-09-11 13:33 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2006-09-01 13:45:34 UTC
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.
Comment 1 Nathan Fiedler 2006-09-08 23:40:00 UTC
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
Comment 2 Nam Nguyen 2006-09-09 00:07:08 UTC
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.
Comment 3 Nam Nguyen 2006-09-09 00:33:21 UTC
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
Comment 4 Nam Nguyen 2006-09-09 00:33:54 UTC
Fixed.
Comment 5 Andrei Chistiakov 2006-09-11 13:33:04 UTC
Verified in build 060910.