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 166574

Summary: ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementImpl cannot be cast to org.w3c.dom.CharacterData
Product: javaee Reporter: sabob <sabob>
Component: DD EditorAssignee: issues@javaee <issues>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: jsedek, pjiricka
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=16465
Issue Type: DEFECT Exception Reporter: 16465
Attachments: stacktrace
stacktrace

Description sabob 2009-06-04 22:10:35 UTC
Build: NetBeans IDE Dev (Build 200905111401)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows XP, 5.1, x86

User Comments:
GUEST: modifing the following text "<listener>       <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>    
</listener>"
in the web.xml, adding or removing a < or > in the class name triggers the exception

sabob: editing web.xml



Stacktrace: 
org.openide.util.RequestProcessor$Item: task failed: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementImpl cannot be cast to org.w3c.dom.CharacterData
        at org.openide.util.RequestProcessor$Item.fillInStackTrace(RequestProcessor.java:853)
        at java.lang.Throwable.<init>(Throwable.java:181)
        at java.lang.Exception.<init>(Exception.java:29)
        at org.openide.util.RequestProcessor$Item.<init>(RequestProcessor.java:819)
        at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:629)
        at org.netbeans.modules.xml.multiview.XmlMultiViewDataSynchronizer.dataModified(XmlMultiViewDataSynchronizer.java:124)
Comment 1 sabob 2009-06-04 22:10:45 UTC
Created attachment 83219 [details]
stacktrace
Comment 2 Petr Jiricka 2009-10-12 13:57:34 UTC
Looks like a problem in the web.xml DD editor. Denis, can you please investigate? Thanks.
Comment 3 Denis Anisimov 2009-10-12 14:23:22 UTC
This problem appears as result of editing which leads to merging schema2beans model.
There is no way to fix it on client side.
ClassCastException is absolutely invalid and schema2beans code should be corrected.
( this is not a case when exception could be caught and ignored even with notification for user ).
Comment 4 Jindrich Sedek 2010-04-26 11:02:00 UTC
Created attachment 98011 [details]
stacktrace

editing web.xml
Comment 5 Petr Jiricka 2011-10-21 14:54:20 UTC
I am trying to reproduce using the steps in the original comment: 
modifing the following text "<listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> 
</listener>"
in the web.xml, adding or removing a < or > in the class name triggers the exception

But can not reproduce. Closing as WORKFORME, if this is still happening for anyone, please reopen. Thanks.