facebook

Cannot open struts 2 struts.xml editor

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #314260 Reply

    Robert Heath
    Member

    When trying to open struts.xml, I cannot open the file and I get the message:

    Could not open the editor: An unexpected exception was thrown.

    What do I do next?

    #314262 Reply

    Robert Heath
    Member

    I tried to reinstall MyEclipse 9, but that did not help. Also, I never removed MyEclipse 8.6, so I reverted to that. But the editor fails there too. I went to the Details box and I got an exception trace. It was a NullPointerException. The trace is:

    java.lang.NullPointerException
    at com.genuitec.eclipse.struts2.model.di.Struts2DiagramFile.findPackageElement(Struts2DiagramFile.java:102)
    at com.genuitec.eclipse.struts2.model.di.Struts2DIModelBuilder2.createPackageNode(Struts2DIModelBuilder2.java:117)
    at com.genuitec.eclipse.struts2.model.di.Struts2DIModeBuilder.updateDiagram(Struts2DIModeBuilder.java:112)
    at com.genuitec.eclipse.struts2.model.di.Struts2DIModelBuilder2.updateDiagram(Struts2DIModelBuilder2.java:253)
    at com.genuitec.eclipse.struts2.editor.Struts2Editor.loadInput(Struts2Editor.java:471)
    at com.genuitec.eclipse.struts2.editor.Struts2Editor.reloadInput(Struts2Editor.java:490)
    at com.genuitec.eclipse.struts2.editor.Struts2ConfigEditor.pageChange(Struts2ConfigEditor.java:100)
    at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1076)
    at com.genuitec.eclipse.struts2.editor.Struts2ConfigEditor.createPages(Struts2ConfigEditor.java:50)
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
    at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:344)
    at org.eclipse.ui.actions.OpenWithMenu$4.handleEvent(OpenWithMenu.java:373)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    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:368)
    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:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

    #314263 Reply

    Robert Heath
    Member

    So the status is that the feature that caused me to purchase MyEclipse, the struts2 Graphical editor does NOT work.

    I must say that this tool is very fragile. I am not giving this tool a very strenuous work out and to get a NullPointerException has to make me wonder.

    The error message: Could not open the editor: An unexpected exception was thrown.

    #314276 Reply

    Brian Fernandes
    Moderator

    Bob,

    Our team is looking into this right now – it’s an error that we have not come across before. The good news is that we are planning a minor update to the 9.0 M2 release this week which should have this fix.
    If possible, could you please send the struts.xml file and the .struts.mex file (see instructions on how to get this file below) to us at support@genuitec.com with subject “ATTN Brian” with a link to this thread? That will help us figure out exactly what is going wrong.

    In the meanwhile, I have a suggestion that might fix the problem:
    1) Open the Navigator view (Window > Show View > General > Navigator)
    2) Navigate to your project and look for a file with an “mex” extension in the same folder as your struts xml file – probably “.struts.mex” – delete or rename this file. (these files are usually hidden in the package explorer)
    3) You can now close the Navigator view and attempt to open the file normally from the package explorer – does this now work? Unfortunately, deleting the .mex file will reset the layout.
    Does this help?

    As a stop gap measure, you can also always open the file in the XML editor (right click > Open With > MyEclipse XML Editor) – the outline view, wizards, content assist and validation should still be available, the graphical editor will not.

    Do let us know how this goes, we have a few Struts 2 related fixes to be pushed into the update release and I would like to ensure that this one makes it there too.

    Thanks.

    #314285 Reply

    Robert Heath
    Member

    Brian,

    I have already fiddled around with struts.xml and .struts.mex files. They are no longer in their pristine states. But the editor is still hosed. I want to get you those files, but I hope that you understand that I cannot let broken tools from MyEcliipse distract me from my primary duties, which is developing a tool for my customers. So yes I am currently using the xml editor to edit struts.xml.

    #314325 Reply

    Brian Fernandes
    Moderator

    Bob,

    Thanks for sending the files in so soon – turns out there was something in there which we could use to replicate the problem – the fix will be in the 9.0M2 update release I mentioned, due in a few days.

    Did you delete the .mex file as I had suggested? If you did and attempt to reopen the struts.xml file, the graphical editor should have worked without issue.

    #314326 Reply

    Robert Heath
    Member

    Actually, I thought of that when the problem occurred. Actually, I renamed the file so that I would not lose the file, if deleting did not work. But anyway deleting the .mex file did not fix the problem. I just tried it again, just to make sure that my alsheimer disease was not distorting reality.

    #314330 Reply

    Brian Fernandes
    Moderator

    Bob,

    Would like to confirm if you tried this in 9.0 M2 or 8.6.1? If in 8.6.1, can you try 9.0 M2? Delete the file, restart MyEclipse (just to be extra safe) and then try to open the editor. If you still see an error, can you send us the stack trace (the trace in the previous post was an 8.6.1 trace) I do understand that you have more important responsibilities, if you can find the time to send us the .mex file (one may be created when you attempt to open the editor) and the struts.xml file that exists at this time, that will help too. I’m planning a build in a few hours and would like to ensure that this issue is fixed.

    Thanks for your patience and support.

    #314331 Reply

    Robert Heath
    Member

    Both create a NullPointerException. As you requested, I exited from 9.0 M2 and restarted. Then I tried to open the file. It failed. The stack trace is:

    java.lang.NullPointerException
    at com.genuitec.eclipse.struts2.model.di.Struts2DiagramFile.findPackageElement(Struts2DiagramFile.java:102)
    at com.genuitec.eclipse.struts2.model.di.Struts2DIModelBuilder2.createPackageNode(Struts2DIModelBuilder2.java:117)
    at com.genuitec.eclipse.struts2.model.di.Struts2DIModeBuilder.updateDiagram(Struts2DIModeBuilder.java:97)
    at com.genuitec.eclipse.struts2.model.di.Struts2DIModelBuilder2.updateDiagram(Struts2DIModelBuilder2.java:253)
    at com.genuitec.eclipse.struts2.editor.Struts2Editor.loadInput(Struts2Editor.java:464)
    at com.genuitec.eclipse.struts2.editor.Struts2Editor.performModelLoadOperation(Struts2Editor.java:469)
    at com.genuitec.eclipse.struts2.editor.Struts2ConfigEditor.performModelLoadOperation(Struts2ConfigEditor.java:157)
    at com.genuitec.eclipse.struts2.editor.Struts2ConfigEditor.initializeEditorOnOpening(Struts2ConfigEditor.java:199)
    at com.genuitec.eclipse.struts2.editor.Struts2ConfigEditor.performEditorLoadOrMergeOperation(Struts2ConfigEditor.java:235)
    at com.genuitec.eclipse.struts2.editor.Struts2ConfigEditor.pageChange(Struts2ConfigEditor.java:244)
    at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067)
    at com.genuitec.eclipse.struts2.editor.Struts2ConfigEditor.createPages(Struts2ConfigEditor.java:61)
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
    at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
    at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
    at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
    at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
    at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
    at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
    at org.eclipse.ui.internal.PartStack.add(PartStack.java:497)
    at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
    at org.eclipse.ui.internal.PartStack.add(PartStack.java:483)
    at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
    at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
    at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
    at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
    at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
    at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
    at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2860)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
    at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:331)
    at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent(OpenWithMenu.java:179)
    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(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)

    A new .mex file was NOT created.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Cannot open struts 2 struts.xml editor

You must be logged in to post in the forum log in