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

Bug 342320

Summary: Error saving document with ANY content model
Product: z_Archived Reporter: Eric Woodruff <eric.woodruff>
Component: MylynAssignee: Florian Thienel <florian>
Status: CLOSED FIXED QA Contact: David Williams <david_williams>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
vex-plugin.xml
none
DTD
none
CSS
none
Sample document none

Description Eric Woodruff CLA 2011-04-08 13:33:49 EDT
Build Identifier: 20100917-0705

eclipse.buildId=M20100909-0800

java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product


Error
Fri Apr 08 10:29:23 PDT 2011
Error saving example.xml: null

java.lang.NullPointerException
at org.eclipse.wst.xml.vex.core.internal.validator.WTPVEXValidator.getAttributeDefinition(WTPVEXValidator.java:78)
at org.eclipse.wst.xml.vex.core.internal.dom.DocumentWriter.attrHasDefaultValue(DocumentWriter.java:350)
at org.eclipse.wst.xml.vex.core.internal.dom.DocumentWriter.addNode(DocumentWriter.java:302)
at org.eclipse.wst.xml.vex.core.internal.dom.DocumentWriter.writeNode(DocumentWriter.java:233)
at org.eclipse.wst.xml.vex.core.internal.dom.DocumentWriter.writeNode(DocumentWriter.java:225)
at org.eclipse.wst.xml.vex.core.internal.dom.DocumentWriter.writeNode(DocumentWriter.java:225)
at org.eclipse.wst.xml.vex.core.internal.dom.DocumentWriter.writeNode(DocumentWriter.java:225)
at org.eclipse.wst.xml.vex.core.internal.dom.DocumentWriter.write(DocumentWriter.java:159)
at org.eclipse.wst.xml.vex.ui.internal.editor.VexEditor.doSave(VexEditor.java:154)
at org.eclipse.ui.internal.SaveableHelper$2.run(SaveableHelper.java:151)
at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:277)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2600)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:285)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:264)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:156)
at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1369)
at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:3334)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3347)
at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:76)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1524)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1257)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1294)
at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:730)
at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:2841)
at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:734)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1743)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4796)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4360)
at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8168)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1238)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2229)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3159)
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(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)


Reproducible: Always

Steps to Reproduce:
While editing an example XML use case document, I'm getting an error saving it. I'll attach the document, the CSS and the DTD.

Steps:
1. open document
2. make minor edit
3. save document
Comment 1 Eric Woodruff CLA 2011-04-08 13:34:24 EDT
Created attachment 192860 [details]
vex-plugin.xml
Comment 2 Eric Woodruff CLA 2011-04-08 13:34:36 EDT
Created attachment 192861 [details]
DTD
Comment 3 Eric Woodruff CLA 2011-04-08 13:34:46 EDT
Created attachment 192862 [details]
CSS
Comment 4 Eric Woodruff CLA 2011-04-08 13:35:28 EDT
Created attachment 192863 [details]
Sample document
Comment 5 Florian Thienel CLA 2011-04-09 16:15:14 EDT
Your document contains an <ulink> element, which is not defined in your DTD. Invalid elements are now tolerated as long as they are wellformed. You can edit their textual content and delete them, but you cannot insert them or edit their attributes.

The fix is already available through our unstable update site.
Comment 6 Eric Woodruff CLA 2011-04-11 12:47:54 EDT
(In reply to comment #5)
> Your document contains an <ulink> element, which is not defined in your DTD.
> Invalid elements are now tolerated as long as they are wellformed. You can edit
> their textual content and delete them, but you cannot insert them or edit their
> attributes.
> 
> The fix is already available through our unstable update site.

Why is it invalid? The document passes the DTD validation because of this:

<!ELEMENT description ANY>

Thanks for the fix.
Comment 7 Florian Thienel CLA 2011-04-11 14:56:57 EDT
> Why is it invalid? The document passes the DTD validation because of this:
> 
> <!ELEMENT description ANY>

You caught me again. I should better read the whole DTD the next time. Fortunately the fix also fixes treatment of the ANY content model.
Comment 8 Florian Thienel CLA 2011-06-02 05:29:12 EDT
Closing resolved bugs.
Comment 9 Florian Thienel CLA 2011-11-09 17:36:27 EST
Moved to Mylyn Docs Vex.