Community
Participate
Working Groups
eclipse.buildId=I20100527-1200 java.version=1.6.0_18 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 Error Tue Jun 01 21:37:45 PDT 2010 A structured model client, org.eclipse.wst.html.core.internal.htmlcss.HTMLDocumentAdapter@d32527 threw following exception during adapter notification (ADD ) java.lang.ClassCastException: java.lang.String cannot be cast to org.w3c.dom.Node at org.eclipse.wst.html.core.internal.htmlcss.HTMLDocumentAdapter.notifyChanged(HTMLDocumentAdapter.java:255) at org.eclipse.wst.sse.core.internal.provisional.AbstractNotifier.notify(AbstractNotifier.java:202) at org.eclipse.wst.xml.core.internal.document.AttrImpl.setName(AttrImpl.java:672) at org.eclipse.wst.xml.core.internal.document.XMLModelParser.changeAttrName(XMLModelParser.java:159) at org.eclipse.wst.xml.core.internal.document.XMLModelParser.changeRegion(XMLModelParser.java:326) at org.eclipse.wst.xml.core.internal.document.DOMModelImpl.regionChanged(DOMModelImpl.java:725) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument._fireEvent(BasicStructuredDocument.java:542) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.fireStructuredDocumentEvent(BasicStructuredDocument.java:1180) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalReplaceText(BasicStructuredDocument.java:1964) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2419) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2404) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.access$2(JobSafeStructuredDocument.java:1) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument$3.run(JobSafeStructuredDocument.java:141) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.wst.sse.ui.EditorExecutionContext.execute(EditorExecutionContext.java:149) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.replaceText(JobSafeStructuredDocument.java:144) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replace(BasicStructuredDocument.java:2364) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.access$0(JobSafeStructuredDocument.java:1) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument$1.run(JobSafeStructuredDocument.java:103) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.wst.sse.ui.EditorExecutionContext.execute(EditorExecutionContext.java:149) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.replace(JobSafeStructuredDocument.java:106) at org.eclipse.jface.text.projection.ProjectionTextStore.replace(ProjectionTextStore.java:111) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1184) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1210) at org.eclipse.jface.text.projection.ProjectionDocument.replace(ProjectionDocument.java:629) at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocumentAdapter.java:248) at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7168) at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:7975) at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2456) at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5928) at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5958) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5652) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1508) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4268) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4160) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
I don't have steps to repro. this exception. Found it while testing JSF functionality.
In this case the stack trace is good enough. The changes for bug 236311 added the attribute's name, as a string, as a value during adapter notification. This is the first time in an XML-based DOM where the value is neither null nor itself a DOM Node.
*** Bug 306567 has been marked as a duplicate of this bug. ***
*** Bug 317622 has been marked as a duplicate of this bug. ***
Created attachment 173326 [details] proposed patch, might need to be scaled back
Patch looks OK to me.
Untargeting pending being able to write a JUnit or having a reproducable scenario. I can't figure out how this could actually happen--AttrImpl can only call notify on an Element and yet the adapter is only installed on a Document.
Changes released to 3_2_Maintenance and HEAD.
Similar exception in WTP 3.3 build, http://build.eclipse.org/webtools/committers/wtp-R3.3.0-I/20101202074646/I-3.3.0-20101202074646/ Steps: 1) Create a JSF 2.0 DWP project. 2) Create a XHTML page 3) Add JSF tag, h:outputText 4) Set the Value attribute, value="foo" Note exception in log file. eclipse.buildId=I20101028-1441 java.version=1.6.0_18 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 Error Thu Dec 02 11:37:35 PST 2010 A structured model client, org.eclipse.wst.html.core.internal.htmlcss.HTMLDocumentAdapter@1ed022a threw following exception during adapter notification (CHANGE ) java.lang.ClassCastException: org.eclipse.wst.html.core.internal.document.ElementStyleImpl cannot be cast to org.w3c.dom.Attr at org.eclipse.wst.html.core.internal.htmlcss.HTMLDocumentAdapter.notifyChanged(HTMLDocumentAdapter.java:306) at org.eclipse.wst.sse.core.internal.provisional.AbstractNotifier.notify(AbstractNotifier.java:202) at org.eclipse.wst.xml.core.internal.document.XMLModelNotifierImpl.notify(XMLModelNotifierImpl.java:238) at org.eclipse.wst.xml.core.internal.document.XMLModelNotifierImpl.notifyDeferred(XMLModelNotifierImpl.java:340) at org.eclipse.wst.xml.core.internal.document.XMLModelNotifierImpl.endChanging(XMLModelNotifierImpl.java:178) at org.eclipse.wst.xml.core.internal.document.DOMModelImpl.changedModel(DOMModelImpl.java:163) at org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel$DocumentToModelNotifier.regionChanged(AbstractStructuredModel.java:164) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument._fireEvent(BasicStructuredDocument.java:542) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.fireStructuredDocumentEvent(BasicStructuredDocument.java:1181) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalReplaceText(BasicStructuredDocument.java:1964) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2419) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2404) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.access$2(JobSafeStructuredDocument.java:1) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument$3.run(JobSafeStructuredDocument.java:141) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.wst.sse.ui.EditorExecutionContext.execute(EditorExecutionContext.java:149) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.replaceText(JobSafeStructuredDocument.java:144) at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replace(BasicStructuredDocument.java:2364) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.access$0(JobSafeStructuredDocument.java:1) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument$1.run(JobSafeStructuredDocument.java:103) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.wst.sse.ui.EditorExecutionContext.execute(EditorExecutionContext.java:149) at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.replace(JobSafeStructuredDocument.java:106) at org.eclipse.jface.text.projection.ProjectionTextStore.replace(ProjectionTextStore.java:111) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1184) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1210) at org.eclipse.jface.text.projection.ProjectionDocument.replace(ProjectionDocument.java:629) at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocumentAdapter.java:248) at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7172) at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:7986) at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2458) at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5932) at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5962) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5656) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1508) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4273) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4165) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4891) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2460) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3673) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:621) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:576) at org.eclipse.equinox.launcher.Main.run(Main.java:1409)
(In reply to comment #9) > Similar exception in WTP 3.3 build, > http://build.eclipse.org/webtools/committers/wtp-R3.3.0-I/20101202074646/I-3.3.0-20101202074646/ > > Steps: > 1) Create a JSF 2.0 DWP project. > 2) Create a XHTML page > 3) Add JSF tag, h:outputText > 4) Set the Value attribute, value="foo" > Note exception in log file. Thanks, Raghu. Rakesh seems to already have a fix for this lined up: Bug 331084.
(In reply to comment #10) > Thanks, Raghu. Rakesh seems to already have a fix for this lined up: Bug > 331084. Great. Thanks.
I released the changes from Bug 331084 that should resolve this.