facebook

NPE when openning struts-config.xml

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #215324 Reply

    JonathanOddy
    Member

    I get a periodic NullPointerException being thrown when openning my struts-config.xml file. This doesn’t happen everytime it is openned, I get a message box “An error has occurred. See error log for more details”. The file is then displayed within the editor pane, however the edit pane only contains the “source” tab. Closing Eclipse and restarting “fixes” the problem.

    
    Stack trace is: 
    !ENTRY org.eclipse.core.runtime 4 2 Sep 16, 2004 14:16:57.945
    !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime".
    !STACK 0
    java.lang.NullPointerException
            at com.genuitec.eclipse.struts.editor.model.ModelManager.getGlobalForwardConfigs(Unknown Source)
            at com.genuitec.eclipse.struts.editor.modeler.model.StrutsConfigDiagram.synchronizeDiagram(Unknown Source)
            at com.genuitec.eclipse.struts.editor.modeler.model.StrutsConfigDiagram.<init>(Unknown Source)
            at com.genuitec.eclipse.struts.editor.modeler.core.StrutsEditor.setInput(Unknown Source)
            at org.eclipse.gef.ui.parts.GraphicalEditor.init(GraphicalEditor.java:271)
            at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:117)
            at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.createFlowModeler(Unknown Source)
            at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.getAdapter(Unknown Source)
            at org.eclipse.search2.internal.ui.text.EditorAnnotationManager.createHighlighter(EditorAnnotationManager.java:114)
            at org.eclipse.search2.internal.ui.text.EditorAnnotationManager.<init>(EditorAnnotationManager.java:46)
            at org.eclipse.search2.internal.ui.text.WindowAnnotationManager.startHighlighting(WindowAnnotationManager.java:74)
            at org.eclipse.search2.internal.ui.text.WindowAnnotationManager.access$1(WindowAnnotationManager.java:69)
            at org.eclipse.search2.internal.ui.text.WindowAnnotationManager$1.partVisible(WindowAnnotationManager.java:59)
            at org.eclipse.ui.internal.PartListenerList2$7.run(PartListenerList2.java:139)
            at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
            at org.eclipse.core.runtime.Platform.run(Platform.java:747)
            at org.eclipse.ui.internal.PartListenerList2.firePartVisible(PartListenerList2.java:137)
            at org.eclipse.ui.internal.WWinPartService$1.partVisible(WWinPartService.java:68)
            at org.eclipse.ui.internal.PartListenerList2$7.run(PartListenerList2.java:139)
            at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
            at org.eclipse.core.runtime.Platform.run(Platform.java:747)
            at org.eclipse.ui.internal.PartListenerList2.firePartVisible(PartListenerList2.java:137)
            at org.eclipse.ui.internal.WorkbenchPage$1.propertyChange(WorkbenchPage.java:139)
            at org.eclipse.ui.internal.LayoutPart.setVisible(LayoutPart.java:268)
            at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:317)
            at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:122)
            at org.eclipse.ui.internal.presentations.DefaultPartPresentation.selectPart(DefaultPartPresentation.java:1111)
            at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:946)
            at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:921)
            at org.eclipse.ui.internal.EditorStack.setVisibleEditor(EditorStack.java:170)
            at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:338)
            at org.eclipse.ui.internal.EditorAreaHelper.openEditor(EditorAreaHelper.java:268)
            at org.eclipse.ui.internal.EditorManager$4.run(EditorManager.java:697)
            at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
            at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:686)
            at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:782)
            at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:585)
            at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:573)
            at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2201)
            at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2134)
            at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2126)
            at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2113)
            at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
            at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2108)
            at org.eclipse.ui.ide.IDE.openEditor(IDE.java:299)
            at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:137)
            at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:110)
            at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49)
            at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:164)
            at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:150)
            at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:212)
            at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188)
            at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:289)
            at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:490)
            at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:429)
            at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
            at org.eclipse.core.runtime.Platform.run(Platform.java:747)
            at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:427)
            at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:635)
            at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:731)
            at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:211)
            at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:206)
            at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:238)
            at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
            at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
            at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
            at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
            at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
            at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
            at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
            at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
            at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
            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:324)
            at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
            at org.eclipse.core.launcher.Main.run(Main.java:644)
            at org.eclipse.core.launcher.Main.main(Main.java:628)
    
    !ENTRY org.eclipse.core.runtime 4 2 Sep 16, 2004 14:16:59.179
    !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime".
    !STACK 0
    java.lang.NullPointerException
            at com.genuitec.eclipse.struts.editor.modeler.core.StrutsEditor.getAdapter(Unknown Source)
            at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.getAdapter(Unknown Source)
            at org.eclipse.gef.ui.actions.ZoomComboContributionItem$1.partActivated(ZoomComboContributionItem.java:74)
            at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:49)
            at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
            at org.eclipse.core.runtime.Platform.run(Platform.java:747)
            at org.eclipse.ui.internal.PartListenerList.firePartActivated(PartListenerList.java:47)
            at org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:1371)
            at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:2695)
            at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:457)
            at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2215)
            at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2134)
            at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2126)
            at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2113)
            at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
            at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2108)
            at org.eclipse.ui.ide.IDE.openEditor(IDE.java:299)
            at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:137)
            at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:110)
            at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49)
            at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:164)
            at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:150)
            at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:212)
            at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188)
            at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:289)
            at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:490)
            at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:429)
            at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
            at org.eclipse.core.runtime.Platform.run(Platform.java:747)
            at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:427)
            at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:635)
            at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:731)
            at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:211)
            at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:206)
            at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:238)
            at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
            at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
            at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
            at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
            at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
            at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
            at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
            at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
            at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
            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:324)
            at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
            at org.eclipse.core.launcher.Main.run(Main.java:644)
            at org.eclipse.core.launcher.Main.main(Main.java:628)My set up details are...
    

    Then trying to save the openned document (after minor changes):

    
    !ENTRY org.eclipse.ui 2 0 Sep 16, 2004 14:17:30.709
    !MESSAGE Save Failed
    !STACK 0
    java.lang.NullPointerException
            at com.genuitec.eclipse.struts.editor.modeler.core.StrutsEditor.createMex(Unknown Source)
            at com.genuitec.eclipse.struts.editor.modeler.core.StrutsEditor.doSave(Unknown Source)
            at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.doSave(Unknown Source)
            at org.eclipse.ui.internal.EditorManager$12.run(EditorManager.java:1160)
            at org.eclipse.ui.internal.EditorManager$10.run(EditorManager.java:1015)
            at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:303)
            at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:253)
            at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:588)
            at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
            at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:585)
            at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1653)
            at org.eclipse.ui.internal.EditorManager.runProgressMonitorOperation(EditorManager.java:1021)
            at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1165)
            at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:2539)
            at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:2551)
            at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:69)
            at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
            at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:141)
            at org.eclipse.ui.internal.commands.Command.execute(Command.java:132)
            at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:471)
            at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:889)
            at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:930)
            at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:548)
            at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$2(WorkbenchKeyboard.java:496)
            at org.eclipse.ui.internal.keys.WorkbenchKeyboard$1.handleEvent(WorkbenchKeyboard.java:261)
            at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
            at org.eclipse.swt.widgets.Display.filterEvent(Display.java:740)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:795)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805)
            at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1734)
            at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1730)
            at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3067)
            at org.eclipse.swt.widgets.Control.windowProc(Control.java:2970)
            at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338)
            at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
            at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1467)
            at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2429)
            at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
            at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
            at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
            at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
            at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
            at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
            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:324)
            at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
            at org.eclipse.core.launcher.Main.run(Main.java:644)
            at org.eclipse.core.launcher.Main.main(Main.java:628)
    

    Platform: Win2K
    Eclipse Build: Version: 3.0.0
    Build id: 200406251208

    MyEclipse: 3.8.1+QF20040825
    Build Id: 200408201200-3.8.1+QF20040825

    java version “1.4.2_02”
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
    Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)

    Jonathan

    #215336 Reply

    Riyad Kalla
    Member

    Jonathan,
    Are the files for this project local or on a remote machine? Are they under any kind of source control, if so, what kind? Is your struts-config.xml file valid? Can you validate it?

    #215344 Reply

    JonathanOddy
    Member

    Are the files for this project local or on a remote machine?
    Local

    Are they under any kind of source control?
    Yes

    if so, what kind?
    CVS
    struts-config.xml held as a text file in UNIX format
    .struts-config.mex is a local file (Window format) and is not in CVS

    Is your struts-config.xml file valid?
    Yes

    Can you validate it?
    Just did msg box says it’s valid.

    #215352 Reply

    Riyad Kalla
    Member

    Weird… everything sounds kosher.

    Ahhh hey do me a favor, I think I know whats wrong… open your Struts config file, click in the outline view to focus it, then exit Eclipse and reload Eclipse… do you get exceptions galore now? I ran into this bug (its a REAL MEAN bug that manifests itself lots of places) but its hard to reproduce. The Struts developer found it/fixed it right after the last quickfix for 3.8.1 went out, but its in 3.8.2 (due out next week). So if this is the bug you found, it should be fixed in the next release.

    #215354 Reply

    JonathanOddy
    Member

    Before I try, assuming I get exceptions galore – how do I stop them (i.e. revert to where I was)? At the moment they happen “occasionally” so it’s not such a big issue…

    Jonathan

    #215388 Reply

    Riyad Kalla
    Member

    I had to close all editors, close my perspective and restart Eclipse, additionally you may need to clean our your config dir, but how about just waiting for 3.8.2 so we can be safe? I don’t want you to loose any work.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: NPE when openning struts-config.xml

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