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 150552

Summary: [65cat] ClassCastException: org.netbeans.api.java.lexer.JavaTokenId cannot be cast to org.netbeans.api.xml.lexer.XMLTokenId
Product: webservices Reporter: rajivderas <rajivderas>
Component: DesignerAssignee: Milan Kuchtiak <mkuchtiak>
Status: RESOLVED FIXED    
Severity: blocker CC: rajivderas
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=129627
Issue Type: DEFECT Exception Reporter: 129627
Attachments: stacktrace
stacktrace
stacktrace

Description rajivderas 2008-10-17 14:33:19 UTC
Build: NetBeans IDE Dev (Build 200810170201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

Stacktrace: 
java.lang.ClassCastException: org.netbeans.api.java.lexer.JavaTokenId cannot be cast to org.netbeans.api.xml.lexer.XMLTokenId
Comment 1 rajivderas 2008-10-17 14:33:26 UTC
Created attachment 72127 [details]
stacktrace
Comment 2 rajivderas 2008-10-17 14:36:21 UTC
Build: NetBeans IDE Dev (Build 200810170201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.ClassCastException: org.netbeans.api.java.lexer.JavaTokenId cannot be cast to org.netbeans.api.xml.lexer.XMLTokenId
        at org.netbeans.modules.xml.xdm.nodes.XMLSyntaxParser.parse(XMLSyntaxParser.java:85)
        at org.netbeans.modules.xml.xdm.XDMModel.prepareSync(XDMModel.java:167)
        at org.netbeans.modules.xml.xdm.XDMModel.sync(XDMModel.java:156)
        at org.netbeans.modules.xml.xdm.xam.XDMAccess.sync(XDMAccess.java:126)
        at org.netbeans.modules.xml.xam.AbstractModel.sync(AbstractModel.java:259)
        at org.netbeans.modules.xml.xam.AbstractModelFactory.getModel(AbstractModelFactory.java:137)
Comment 3 rajivderas 2008-10-17 14:36:26 UTC
Created attachment 72130 [details]
stacktrace
Comment 4 Samaresh Panda 2008-10-17 19:16:34 UTC
This is a very interesting bug. Not sure why should it get a JavaTokenId while dealing with XML/Schema/WSDL files. Is
there a way to reproduce this issue? Please describe in detail.
Comment 5 rajivderas 2008-10-17 19:59:00 UTC
steps:
1) Create the sample StockQuoteService 
2) Right click the stock service ws file and select add operation
3) In add operation dialog box click import xml schema
4) In add schema dialog click the add button 
5) In the Select schema bean tree dialog expand the tree and double click stock service.java ws file and press ok

using Dev Build 200810170201
Comment 6 Samaresh Panda 2008-10-17 20:19:54 UTC
If you select a java file instead of a schema document, then this is bound to happen. The import dialog should fix this
problem. Assigning to websvc...
Comment 7 rajivderas 2008-10-31 08:45:44 UTC
Build: NetBeans IDE 6.5 RC2 (Build 200810270001)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.ClassCastException: org.netbeans.api.java.lexer.JavaTokenId cannot be cast to org.netbeans.api.xml.lexer.XMLTokenId
        at org.netbeans.modules.xml.xdm.nodes.XMLSyntaxParser.parse(XMLSyntaxParser.java:85)
        at org.netbeans.modules.xml.xdm.XDMModel.prepareSync(XDMModel.java:167)
        at org.netbeans.modules.xml.xdm.XDMModel.sync(XDMModel.java:156)
        at org.netbeans.modules.xml.xdm.xam.XDMAccess.sync(XDMAccess.java:126)
        at org.netbeans.modules.xml.xam.AbstractModel.sync(AbstractModel.java:259)
        at org.netbeans.modules.xml.xam.AbstractModelFactory.getModel(AbstractModelFactory.java:137)
Comment 8 rajivderas 2008-10-31 08:45:48 UTC
Created attachment 72974 [details]
stacktrace
Comment 9 Milan Kuchtiak 2008-11-27 16:24:13 UTC
We plan to remove Add WS Operation dialog for 7.0.
See the comment added to issue 150551.
Comment 10 Milan Kuchtiak 2008-12-09 13:02:30 UTC
Fixed.
See the issue 122687.