Community
Participate
Working Groups
In WTP 3.2 empty tags were inputted into the orm.xml, when editing via the JPA Details, like this: <xml-mapping-metadata-complete /> In WTP 3.3, current code the empty tags are inputted like this: <xml-mapping-metadata-complete ></xml-mapping-metadata-complete> This still works, but is more information than necessary. I have not figured out when this changed in the translator framework.
Moving JPA specific bugs to new JPA component in bugzilla.
Nitin...any ideas on this?
Which set of APIs is used to add them?
We create a Translator with the style EMPTY_TAG | BOOLEAN_FEATURE
EMF2DOMAdapterImpl is adding a zero-length Text node as a child of the xml-mapping-metadata-complete element. Thread [main] (Suspended) XMLGeneratorImpl.generateCloseTag(Node) line: 241 XMLModelUpdater.replaceChild(Node, Node, Node) line: 1416 DOMModelImpl.childReplaced(Node, Node, Node) line: 192 ElementImpl(NodeContainer).notifyChildReplaced(Node, Node) line: 361 ElementImpl(NodeContainer).insertBefore(Node, Node) line: 302 ElementImpl.insertBefore(Node, Node) line: 761 ElementImpl(NodeContainer).appendChild(Node) line: 129 EMF2DOMSSEAdapter(EMF2DOMAdapterImpl).findOrCreateTextNode(Node, Translator, String) line: 1296 <---- Node is empty xml-mapping-metadata-complete element, String is null. EMF2DOMSSEAdapter(EMF2DOMAdapterImpl).updateDOMSubtree(Translator, Node, EObject, Object) line: 1699 EMF2DOMSSEAdapter(EMF2DOMAdapterImpl).primUpdateDOMFeature(Translator, Node, EObject) line: 1387 EMF2DOMSSEAdapter(EMF2DOMAdapterImpl).updateDOMFeature(Translator, Node, EObject) line: 1621 EMF2DOMSSEAdapter(EMF2DOMAdapterImpl).notifyChanged(Notification) line: 1099 XmlPersistenceUnitMetadata(BasicNotifierImpl).eNotify(Notification) line: 380 XmlPersistenceUnitMetadata(AbstractJpaEObject).eNotify(Notification) line: 94 XmlPersistenceUnitMetadata.setXmlMappingMetadataComplete(boolean) line: 189 GenericOrmPersistenceUnitMetadata(AbstractOrmPersistenceUnitMetadata).setXmlMappingMetadataComplete(boolean) line: 108 PersistenceUnitMetadataComposite$6.setValue_(Boolean) line: 217 PersistenceUnitMetadataComposite$6.setValue_(Object) line: 1 PersistenceUnitMetadataComposite$6(AspectPropertyValueModelAdapter<S,V>).setValue(V) line: 92 BooleanButtonModelBinding.buttonSelected() line: 170 BooleanButtonModelBinding$2.widgetSelected(SelectionEvent) line: 119 TypedListener.handleEvent(Event) line: 240 EventTable.sendEvent(Event) line: 84 Button(Widget).sendEvent(Event) line: 1053 Display.runDeferredEvents() line: 4165 Display.readAndDispatch() line: 3754 PartRenderingEngine$9.run() line: 969 Realm.runWithDefault(Realm, Runnable) line: 332 PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 885 E4Workbench.createAndRunUI(MApplicationElement) line: 90 Workbench$3.run() line: 539 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 519 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 123 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 344 EclipseStarter.run(String[], Runnable) line: 179 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Main.invokeFramework(String[], URL[]) line: 622 Main.basicRun(String[]) line: 577 Main.run(String[]) line: 1410 Main.main(String[]) line: 1386
This appears to be a generic problem with EMF2DOMAdapterImpl. Assigning to WTP Common.
Created attachment 202363 [details] test patch
Paul, does Nitin's change still fix the scenario you needed fixed for bug 190876 ?
I am fine with this change.
Sorry, just had a chance to look at this after being out of town. The long-story-short is: I don't think this change affects our situation regarding the other bug. We still don't have a great story there, but I don't think the before and after behaviors are different.
Moving this out to 3.3.2
(In reply to comment #10) > Sorry, just had a chance to look at this after being out of town. > > The long-story-short is: I don't think this change affects our situation > regarding the other bug. We still don't have a great story there, but I > don't think the before and after behaviors are different. With the other bug now fixed, is this bug and patch still of interest? Karen? Paul?
I'm not sure I understand, the fix for bug 190876 is what caused this bug. So, yes this bug still exists in 3.4.0 and was a change in functionality from 3.2
Nitin committed the fix for this to WTP 3.5.0. I am marking this as resolved. If the fix was not sufficient, please reopen this bug.