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 78702 - Get ClassCastException if delete *.bpel file from project tree
Summary: Get ClassCastException if delete *.bpel file from project tree
Status: CLOSED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Project (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-21 01:54 UTC by _ hong_lin
Modified: 2006-08-31 02:01 UTC (History)
0 users

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 _ hong_lin 2006-06-21 01:54:05 UTC
Build: NB 5.5 Dev 200606150200

Steps to reproduce it:

1. Create a SynchronousSample project.
2. Expand SynchronousSample > Source Packages > <default package> node
3. Right-click SynchronousSample.bpel file, select Delete from the context menu.
4. Will get ClassCastException:
java.lang.ClassCastException: java.lang.Integer
	at org.openide.util.lookup.ArrayStorage$Transaction.<init>(ArrayStorage.java:344)
	at org.openide.util.lookup.ArrayStorage.beginTransaction(ArrayStorage.java:237)
	at
org.openide.util.lookup.DelegatingStorage.beginTransaction(DelegatingStorage.java:89)
	at org.openide.util.lookup.AbstractLookup.removePair(AbstractLookup.java:210)
	at
org.openide.util.lookup.AbstractLookup$Content.removePair(AbstractLookup.java:1098)
	at org.openide.util.lookup.InstanceContent.remove(InstanceContent.java:66)
	at
org.netbeans.modules.bpel.core.BPELDataObject.setModified(BPELDataObject.java:93)
	at
org.openide.text.DataEditorSupport$Env.unmarkModified(DataEditorSupport.java:550)
	at
org.openide.windows.CloneableOpenSupport$Listener.run(CloneableOpenSupport.java:315)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
[catch] at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Michael Frisino 2006-07-16 23:35:47 UTC
assigning to Denis as BPELDataObject is in stack. Feel free to reassign if not
your problem.
Comment 2 Denis Anisimov 2006-07-18 15:10:36 UTC
There are two issues actually in this bug.

One - ClassCastException.
It appears when user open editor but don't change BPEL file.
It seems this is origiannly bug inside NB InstanceContent implementation .
I don't want to start discussion about this problem with NB gyus, so I just 
put into InstanceContent fake objec. The problem with InstanceContent it seems 
appear when one tries to delete smth. but InstanceContent is empty. When
InstanceContent has some object inside it then all is ok. And there is no
methods in InstanceContent that can be used for query its non-emptiness.

The second - NPE. It appears when user dosn't open at all editor for BPEL.
In this case InstanceContent was not initialized via lookup bootstrapping.
And trying to remove smth from null instance of InstanceContent cause NPE.
One need to check initialized InstanceContent before add/remove smth to/from it.

Both issues are fixed.
Comment 3 _ hong_lin 2006-07-27 02:13:35 UTC
Verified the bug is fixed in nightly 060725