error after deleting a resource

Dana Bergen <[email protected]> Tue, 14 Oct 2003 16:52:19 -0700
Newsgroups gmane.comp.java.netbeans.modules.projects.devel
Message-ID <[email protected]>
It looks like when I remove a resource from a project, some setting in
memory is not getting cleaned up.  

The resource gets created as follows:

Create the file representing the resource
Create the ResourceDescriptor
Create a RemoteResource
Add the resource as a build dependency of the build target

I'm removing the resource as follows:

Remove the build dependency
Call ProjectMember.delete() on the project member for the resource file

Following this, if I try to build my project, I get the error below. 
Note, if I restart the ide after removing the resource but before trying
to build, the build works fine and I don't get this error.

Annotation: Exception occurred in Request Processor
java.lang.IllegalStateException: Using already destroyed ContextId:
nbprjres://project/ProjectFileSystemPosition/Containers/web_1.webModuleResource
	at
org.netbeans.api.projects.settings.ContextId.validate(ContextId.java:163)
	at
org.netbeans.api.projects.settings.ContextId.getExternalId(ContextId.java:63)
	at
org.netbeans.api.projects.settings.NamingManager.findRef(NamingManager.java:197)
	at
org.netbeans.api.projects.settings.NamingManager.getContext(NamingManager.java:123)
	at
org.netbeans.api.projects.settings.ConfigurationContext.getContext(ConfigurationContext.java:408)
	at
org.netbeans.api.projects.settings.ConfigurationContext.getContext(ConfigurationContext.java:398)
	at
org.netbeans.api.projects.settings.ConfigurationContext.getBindingNames(ConfigurationContext.java:93)
	at org.netbeans.api.registry.Context.getBindingNames(Context.java:329)
	at
org.netbeans.modules.projects.settings.ProxyContext.notifyAttributeEvent(ProxyContext.java:290)
	at
org.netbeans.modules.projects.settings.ProxyContext.access$000(ProxyContext.java:30)
	at
org.netbeans.modules.projects.settings.ProxyContext$L.attributeChanged(ProxyContext.java:315)
	at
org.netbeans.api.projects.settings.ConfigurationContext.fireContextEvent(ConfigurationContext.java:438)
	at
org.netbeans.api.projects.settings.ConfigurationContext.notifyEvent(ConfigurationContext.java:430)
	at
org.netbeans.api.projects.settings.ConfigurationContext.access$000(ConfigurationContext.java:28)
	at
org.netbeans.api.projects.settings.ConfigurationContext$1.run(ConfigurationContext.java:254)
	at
org.netbeans.api.projects.settings.ConfigurationManager$R.run(ConfigurationManager.java:593)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:677)

Is there something else I need to be doing, or is this a bug?

Dana