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 225289

Summary: ClassCastException: org.netbeans.modules.html.editor.xhtml.XhtmlElLanguage$XhtmlELParser$FakeResult cannot be cast to org.netbeans.modules.html.editor.api.gsf.HtmlParserResult
Product: ide Reporter: Exceptions Reporter <exceptions_reporter>
Component: CodeAssignee: issues@ide <issues>
Status: RESOLVED DUPLICATE    
Severity: normal CC: athompson
Priority: P2    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 197927
Attachments: stacktrace

Description Exceptions Reporter 2013-01-24 14:14:19 UTC
Build: NetBeans IDE Dev (Build 201301220001)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.6-b01, Java(TM) SE Runtime Environment, 1.6.0_31-b05
OS: Windows 7

User Comments:
athompson: opened an xhtml file in a maven web project with richfaces support




Stacktrace: 
java.lang.ClassCastException: org.netbeans.modules.html.editor.xhtml.XhtmlElLanguage$XhtmlELParser$FakeResult cannot be cast to org.netbeans.modules.html.editor.api.gsf.HtmlParserResult
   at org.netbeans.modules.css.visual.HtmlEditorSourceTask.run(HtmlEditorSourceTask.java:72)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
   at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:737)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
Comment 1 Exceptions Reporter 2013-01-24 14:14:21 UTC
Created attachment 130589 [details]
stacktrace
Comment 2 athompson 2013-01-25 16:29:30 UTC
This no longer throws a CCE as of the today's build. However, now it seems to do some bizarre (and incorrect) on-the-fly re-indenting of lines in the editor of XHTML files. It's hard to describe but you should be able to replicate it by simply opening an XHTML file in the editor which indents using tabs and moving from line to line. It affects JSP HTML, and XHTML files, but not XML files.

The problem is clearly related (I imagine Netbeans is now simply swallowing the CCEs thrown by the HTML parser but that causes the parsed elements to be incorrect), but technically this bug has been resolved (no more CCE). Do you want me to close this bug and create a new one, or just leave this bug open?
Comment 3 Marian Mirilovic 2013-01-28 14:58:33 UTC
Please test the latest build from trunk and report potential problems as separate issue, thanks in advance.

*** This bug has been marked as a duplicate of bug 225228 ***
Comment 4 athompson 2013-01-31 00:32:10 UTC
It looks like the indentation issue has gone away with the latest build. Procrastination pays off again!