Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334308

Summary: DOMException if @XmlBinding on element property specifies a path
Product: z_Archived Reporter: Konstantin Komissarchik <konstantin>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: shenxue.zhou
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantin Komissarchik CLA 2011-01-13 14:36:46 EST
The following exception is thrown if binding for an _element_ property is specified as follows:

@XmlBinding( path = "foo/bar" )

It looks like the binding code assumes that the path is an element name in this case. It needs to treat it as an actual path.

org.w3c.dom.DOMException
	at org.eclipse.wst.xml.core.internal.document.DocumentImpl.createElementNS(DocumentImpl.java:400)
	at org.eclipse.sapphire.modeling.xml.XmlElement.addChildElement(XmlElement.java:525)
	at org.eclipse.sapphire.modeling.xml.XmlElement.getChildElement(XmlElement.java:463)
	at org.eclipse.sapphire.modeling.xml.XmlElement.getChildElement(XmlElement.java:474)
	at org.eclipse.sapphire.modeling.xml.StandardXmlElementBindingImpl.createUnderlyingObject(StandardXmlElementBindingImpl.java:138)
	at org.eclipse.sapphire.modeling.LayeredElementBindingImpl.create(LayeredElementBindingImpl.java:47)
	at org.eclipse.sapphire.modeling.ModelElementHandle.element(ModelElementHandle.java:117)
	at org.eclipse.sapphire.modeling.ModelElementHandle.element(ModelElementHandle.java:71)
	at org.eclipse.sapphire.ui.SapphireWithDirective$2.widgetSelected(SapphireWithDirective.java:145)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	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.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	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)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Konstantin Komissarchik CLA 2011-01-13 14:39:57 EST
Released fix for 0.2.1 release.
Comment 2 Shenxue Zhou CLA 2011-02-24 18:41:56 EST
Verified this type of binding using sample app.