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 172421 - [68cat] ClassCastException: SerialDataNode cannot be cast to Node$Cookie
Summary: [68cat] ClassCastException: SerialDataNode cannot be cast to Node$Cookie
Status: RESOLVED INCOMPLETE
Alias: None
Product: xml
Classification: Unclassified
Component: API (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P2 blocker (vote)
Assignee: _ alexpetrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-16 21:20 UTC by peter_rogge
Modified: 2009-09-19 09:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
simple modulesuite to recreate the exception (585.56 KB, text/plain)
2009-09-17 12:27 UTC, peter_rogge
Details
Logfiles to the exception in Build 200909181401 (16.26 KB, text/plain)
2009-09-19 09:50 UTC, peter_rogge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peter_rogge 2009-09-16 21:20:48 UTC
Hi,
in my project I delete all folders in layer.xml -> <this layer in context> -> Toolbars.
When I delete the last folder following exception are thrown:

java.lang.ClassCastException: org.netbeans.modules.settings.convertors.SerialDataNode cannot be cast to
org.openide.nodes.Node$Cookie
        at org.openide.loaders.XMLDataObject.getCookie(XMLDataObject.java:326)
        at org.netbeans.modules.xml.XMLDataObject.getCookie(XMLDataObject.java:180)
        at org.openide.loaders.DataNode.getCookie(DataNode.java:428)
        at org.openide.nodes.NodeLookup.addCookie(NodeLookup.java:97)
        at org.openide.nodes.NodeLookup.updateLookupAsCookiesAreChanged(NodeLookup.java:189)
        at org.openide.nodes.NodeLookup.beforeLookup(NodeLookup.java:160)
        at org.openide.util.lookup.AbstractLookup.lookupItem(AbstractLookup.java:418)
        at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:412)
        at org.openide.nodes.FilterNode$FilterLookup.lookup(FilterNode.java:2088)
        at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:205)
        at org.netbeans.modules.navigator.NavigatorController.updateContext(NavigatorController.java:380)
        at org.netbeans.modules.navigator.NavigatorController.updateContext(NavigatorController.java:274)
        at org.netbeans.modules.navigator.NavigatorController.access$900(NavigatorController.java:99)
[catch] at org.netbeans.modules.navigator.NavigatorController$ActNodeSetter.run(NavigatorController.java:726)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:117)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

To repeat this exception simple delete from first to last folder in layer.xml -> <this layer in context> -> Toolbars.

Product Version: NetBeans IDE Build 200909151512
Java: 1.6.0_16; Java HotSpot(TM) Server VM 14.2-b01
System: Windows Vista version 6.0 running on x86; Cp1252; de_DE

See also:
http://www.nabble.com/-68cat---editor--ClassCastException%3A-SerialDataNode-cannot-be-cast-to-Node%24Cookie-td25478750.html
Comment 1 Jiri Kovalsky 2009-09-16 21:36:37 UTC
Reported by NetCAT 6.8 participant hence adding [68cat] prefix.
Comment 2 peter_rogge 2009-09-17 07:22:56 UTC
I try it also under:

Operating System        = Windows XP version 5.1 running on x86
Java; VM; Vendor        = 1.6.0_07; Java HotSpot(TM) Server VM 10.0-b23; Sun Microsystems Inc.
Runtime                 = Java(TM) SE Runtime Environment 1.6.0_07-b06

First I have the exception, next tries not.
After restart IDE + start project I have again the exception.
Comment 3 Sergey Lunegov 2009-09-17 08:32:59 UTC
Please attach your project.
Comment 4 peter_rogge 2009-09-17 12:22:52 UTC
Simple test to recreate the exception:
1) Create ModuleSuite
2) Create Modul with TC
3) Go to layer.xml -> <this layer in context> -> Toolbars and delete the folders with Delete and Enter.
Comment 5 peter_rogge 2009-09-17 12:27:49 UTC
Created attachment 87851 [details]
simple modulesuite to recreate the exception
Comment 6 peter_rogge 2009-09-19 09:48:51 UTC
In the new build is this exception also:

Product Version = NetBeans IDE Dev (Build 200909181401) (#e14c9c33faed)
Operating System = Windows Vista version 6.0 running on x86
Java; VM; Vendor = 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01; Sun Microsystems Inc.
Runtime = Java(TM) SE Runtime Environment 1.6.0_16-b01

Here are the steps to reproduce the exception:
 a) Go in a rcp-program to the layer.xml (Important Files).
 b) Open above <this layer in context> to the folder "Toolbars".
 c) Delete all folders with key del + enter.
 
 d) By the last folder, when the focus jumps to the file "Standard", the exception is thrown.
Comment 7 peter_rogge 2009-09-19 09:50:49 UTC
Created attachment 87947 [details]
Logfiles to the exception in Build 200909181401