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.
I got this trace with a current NB 6 build. No clue what the trigger was but I've never seen it before. java.lang.ClassCastException: org.netbeans.modules.palette.PaletteItemNode cannot be cast to org.openide.nodes.Node$Cookie at org.openide.loaders.XMLDataObject.getCookie(XMLDataObject.java:302) at org.openide.loaders.DataNode.getCookie(DataNode.java:397) at org.openide.nodes.NodeLookup.addCookie(NodeLookup.java:76) ... see attached for the rest
Created attachment 41948 [details] stack trace
any steps to reproduce? was it html or form or any other palette? nb version? jdk version?
I'm able to reproduce by following steps from http://platform.netbeans.org/tutorials/nbm-palette-api3.htm (but on my project and on new empty module project too) reproducible with 070523, not reproducible in 5.5 steps: 0. create netbeans module project next from tutorial, but change folder to folder in your ptoject: 1. Right-click the project, select New -> File/Folder... Choose XML under Categories then XML Document under File Types. Click Browse... and select src/com/example/palette (Click Select Folder). Click Next. 2. In the Name and Location panel, type simple-item for the File Name. Click Next. 3. In the Select Document Type choose DTD-Constrained Document. Click Next. 4. In the DTD Options, choose from the list for DTD Public ID -//NetBeans//Editor Palette Item 1.0//EN. Select editor_palette_item for the Document Root. Click Finish. exception is thrown, and is thrown again each time xml node is selected in project tree, generated xml contains 'null' instead of correct link to dtd. Why the issue is marked for 'future'?
Each click, each save each modification with element_node xml followed by exception, can't open xml after ide restart =>P1
fixed /cvs/core/palette/src/org/netbeans/modules/palette/PaletteItemNode.java,v <-- PaletteItemNode.java new revision: 1.15; previous revision: 1.14
Ok, I don't see ClassCastException any more, but not sure if I should verify the issue Still have minor problem with opening: can't open with doubleclick, but can use context menu Edit now, may be I'll file separate issue later if not yet filed
*** Issue 93051 has been marked as a duplicate of this issue. ***