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 208265 - ClassCastException: org.netbeans.modules.html.editor.xhtml.XhtmlElTokenId cannot be cast to org.netbeans.api.xml.lexer.XMLTokenId
Summary: ClassCastException: org.netbeans.modules.html.editor.xhtml.XhtmlElTokenId can...
Status: RESOLVED INCOMPLETE
Alias: None
Product: xml
Classification: Unclassified
Component: XDM (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-10 18:13 UTC by cdicarlo
Modified: 2012-03-14 14:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 184991


Attachments
stacktrace (4.11 KB, text/plain)
2012-02-10 18:13 UTC, cdicarlo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cdicarlo 2012-02-10 18:13:27 UTC
This bug was originally marked as duplicate of bug 150552, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201202060400)
VM: Java HotSpot(TM) Client VM, 21.1-b02, Java(TM) SE Runtime Environment, 1.7.0_01-b08
OS: Windows 7

User Comments:
cdicarlo: Tried to open the project properties.




Stacktrace: 
java.lang.ClassCastException: org.netbeans.modules.html.editor.xhtml.XhtmlElTokenId cannot be cast to org.netbeans.api.xml.lexer.XMLTokenId
   at org.netbeans.modules.xml.xdm.nodes.XMLSyntaxParser.parse(XMLSyntaxParser.java:88)
   at org.netbeans.modules.xml.xdm.XDMModel.prepareSync(XDMModel.java:179)
   at org.netbeans.modules.xml.xdm.XDMModel.sync(XDMModel.java:159)
   at org.netbeans.modules.xml.xdm.xam.XDMAccess.sync(XDMAccess.java:139)
   at org.netbeans.modules.xml.xam.AbstractModel.sync(AbstractModel.java:283)
   at org.netbeans.modules.xml.xam.AbstractModelFactory.getModel(AbstractModelFactory.java:140)
Comment 1 cdicarlo 2012-02-10 18:13:32 UTC
Created attachment 115597 [details]
stacktrace
Comment 2 Svata Dedic 2012-03-14 14:02:05 UTC
It's Maven project, Right click > Properties opened on the project node.

Could you please:
* try to open the pom.xml file in the editor ?
* check the pom.xml file headers, whether it has correct namespaces declared, like

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

From the stacktrace, it seems that HTML module took over this file (it was processed by XHTML lexer) - I need to find out why.