facebook

NullPointerException when saving xhtml files

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #297313 Reply

    nsoule
    Member

    Hello, in MyEclipe Blue 7.1.1 after a while of editing xhtml files – when I go to save I get a NullPointerException with a message that says the Save didn’t complete successfully (though it appears that it actually does save ok). At that point I can’t open any new xhtml files in the visual editor, only in the text editor. I haven’t noticed any pattern yet that leads to this, as it works fine most of the time.

    Thanks!

    -Nate

    java.lang.NullPointerException
    at org.eclipse.jst.pagedesigner.editors.actions.DesignPageActionContributor.setActiveEditor(DesignPageActionContributor.java:199)
    at org.eclipse.jst.pagedesigner.editors.actions.PageDesignerActionBarContributor2.activateSourcePage(PageDesignerActionBarContributor2.java:290)
    at org.eclipse.jst.pagedesigner.editors.actions.PageDesignerActionBarContributor2.setInnerActivePage(PageDesignerActionBarContributor2.java:212)
    at org.eclipse.jst.pagedesigner.ui.common.sash.NestedEditorActionBarContributor.setActivePage(NestedEditorActionBarContributor.java:34)
    at com.genuitec.eclipse.jsf.designer.editors.CustomSashEditor.activeEditorChanged(CustomSashEditor.java:427)
    at com.genuitec.eclipse.jsf.designer.editors.CustomSashEditor$1.handleEvent(CustomSashEditor.java:100)
    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.Widget.sendEvent(Widget.java:1027)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)
    at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1353)
    at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2443)
    at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2266)
    at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:4414)
    at org.eclipse.swt.widgets.Canvas.WM_SETFOCUS(Canvas.java:443)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3855)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:337)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4541)
    at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
    at org.eclipse.swt.widgets.Control.forceFocus(Control.java:974)
    at org.eclipse.swt.widgets.Control.setSavedFocus(Control.java:3080)
    at org.eclipse.swt.widgets.Decorations.restoreFocus(Decorations.java:808)
    at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1617)
    at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2013)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3784)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:337)
    at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1576)
    at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1937)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4528)
    at org.eclipse.swt.internal.win32.OS.DestroyWindow(Native Method)
    at org.eclipse.swt.widgets.Control.destroyWidget(Control.java:663)
    at org.eclipse.swt.widgets.Shell.destroyWidget(Shell.java:657)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:814)
    at org.eclipse.swt.widgets.Widget.dispose(Widget.java:441)
    at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:446)
    at org.eclipse.swt.widgets.Shell.dispose(Shell.java:674)
    at org.eclipse.jface.window.Window.close(Window.java:335)
    at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:979)
    at org.eclipse.jface.dialogs.Dialog.okPressed(Dialog.java:940)
    at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)
    at org.eclipse.ui.internal.dialogs.ShowViewDialog.buttonPressed(ShowViewDialog.java:109)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
    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:3823)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:100)
    at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:77)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:281)
    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.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
    at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java:134)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    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:3823)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
    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:193)
    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:386)
    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:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

    #297335 Reply

    Loyal Water
    Member

    Nate,
    This sounds like an issue related to a corrupt workspace. Can you add the -clean command to your ini file and check if this issue gets rectified:-
    https://www.genuitec.com/forums/topic/troubleshoot-using-the-clean-command-line-argument/

    #297341 Reply

    nsoule
    Member

    Hi Nipun, I now alays start from a shortcut that has -clean on the path and still get this. That being said, just restarting the app does fix the issue temporarily. On a fresh start this is never a problem, only after using the IDE for a long period of time with a lot of xhtml edits.

    Thanks.

    -Nate

    #297350 Reply

    Loyal Water
    Member

    Nate,
    Would it be possible for you to transfer the project to a new workspace and wok there for a while to check if the issue persists in the new workspace as well. Incase it does persist, we can eliminate this issue being related to the workspace.

    Thank you.

    #297423 Reply

    nsoule
    Member

    Hi Nipun. I’ll try this. It may take a while to determine for sure though, as this only happens occasionally and after a long period of development. I’ll let you know if I can repeat this in a second workspace. Thanks.

    -Nate

    #297439 Reply

    Loyal Water
    Member

    Sure.

    #298804 Reply

    nsoule
    Member

    Hello, I am now in a new workspace (due to another issue reported where the IDE stops being able to run Java Builder after using a workspace for a while). In the new workspace I have now seen the NullPointerException again after editing xhtml files for an extended period of time.

    Thanks.

    -Nate

    #298869 Reply

    Loyal Water
    Member

    Nate,
    Can you share a sample project with us? How big are the projects that you are working with?

    How long is “extended period of time”? A few hours? Days?

    #298877 Reply

    Riyad Kalla
    Member

    Update:

    Nate, depending on what your usage of MyEclipse looks like, it’s entirely possible you guys could be running out of memory (for example, someone that stays in the Java editor all day is fine with 512MB heap, someone that flips between UML, Swing GUI design, DB Explorer, Spring and Visual Designer is going to smash into heap limit in 1hr)

    The easiest thing to try is to edit the myeclipse.ini file in your install directory and bump the -Xmx size up to like 768m and the permgen size to 256m.

    #298878 Reply

    nsoule
    Member

    Thanks Riyad. I’ve just made this change and will continue testing. I’ll let you know if I run into the issue again with the new settings (I set 1024 for xmx and 256 for permgen).

    -Nate

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: NullPointerException when saving xhtml files

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