Results 1 to 5 of 5

Thread: IDE - java.lang.NullPointerException in Event Loop

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    3

    Default IDE - java.lang.NullPointerException in Event Loop

    Hi, I just got the 2.2.1 version and i get the an error when trying to display Graph from an element in Spring Explorer.
    I have no idea why it happens - the file is valid and beans are shown in Spring Explorer tree.
    Only difference is that I can't select "Open Graph" from file node context menu - menu entry is not shown as usual, when i use "Open Graph" from "beans" node context menu I get a NullPointerException.

    So far only solution I have found is to restart eclipse with -clean, but this is not acceptable as this bug happens quite often. Any help would be appericiated.
    eclipse.buildId=M20080911-1700
    java.version=1.6.0_11
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pl_PL
    Command-line arguments: -os win32 -ws win32 -arch x86 -clean


    Error
    Fri Feb 13 14:05:11 CET 2009
    Unhandled event loop exception

    java.lang.NullPointerException
    at org.springframework.ide.eclipse.beans.ui.graph.edi tor.GraphEditorInput.getContext(GraphEditorInput.j ava:400)
    at org.springframework.ide.eclipse.beans.ui.graph.edi tor.GraphEditorInput.<init>(GraphEditorInput.java: 93)
    at org.springframework.ide.eclipse.beans.ui.graph.int ernal.navigator.actions.ShowBeansGraphAction.run(S howBeansGraphAction.java:83)
    at org.eclipse.jface.action.Action.runWithEvent(Actio n.java:498)
    at org.eclipse.jface.action.ActionContributionItem.ha ndleWidgetSelection(ActionContributionItem.java:58 3)
    at org.eclipse.jface.action.ActionContributionItem.ac cess$2(ActionContributionItem.java:500)
    at org.eclipse.jface.action.ActionContributionItem$5. handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Event Table.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.ja va:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents( Display.java:3823)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Di splay.java:3422)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Wor kbench.java:2382)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench. java:2346)
    at org.eclipse.ui.internal.Workbench.access$4(Workben ch.java:2198)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench. java:493)
    at org.eclipse.core.databinding.observable.Realm.runW ithDefault(Realm.java:288)
    at org.eclipse.ui.internal.Workbench.createAndRunWork bench(Workbench.java:488)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Pl atformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplica tion.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle. run(EclipseAppHandle.java:193)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.runApplication(EclipseAppLauncher.java: 110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:386)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known 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.ja va:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:12 36)

  2. #2
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    bochen,

    that sounds very strange to me. What you are saying is that you can't use "Open Graph" from the context menu of the file in the Spring Explorer as there is no such entry. And the "beans" element gives you the NPE?

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  3. #3
    Join Date
    Feb 2009
    Posts
    3

    Default

    Quote Originally Posted by Christian Dupuis View Post
    bochen,

    that sounds very strange to me. What you are saying is that you can't use "Open Graph" from the context menu of the file in the Spring Explorer as there is no such entry. And the "beans" element gives you the NPE?

    Christian
    Umm.. that is what I wrote, is what do you find unclear?

    I attached screenshots to illustrate, as you can see, none of the spring-IDE entries are shown when this situation happens.

    When I click below on the "beans" node and select "Show graph" I get this NullPointerException.

    Furthermore when I choose "Show graph" from the root "beans" node (or from "application-context.xml" node) it shows a graph without elements from this import.

    This usually happens when modyfying the file (adding or removing beans) while the graph editor is open, and requires eclipse restart to fix.

    Did I make myself sufficently clear to get some support?
    Attached Images Attached Images

  4. #4
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    bochen,

    Thanks for providing the explanation. I do understand the problem now. But I can't reproduce it on my end. Can you reproduce this behavior always? If so, could you please provide a sample project that exhibits the problem and instructions how to re-produce the problem?

    That would be really helpful in order to get that solved.

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  5. #5
    Join Date
    Feb 2009
    Posts
    3

    Default

    Quote Originally Posted by Christian Dupuis View Post
    bochen,

    Thanks for providing the explanation. I do understand the problem now. But I can't reproduce it on my end. Can you reproduce this behavior always? If so, could you please provide a sample project that exhibits the problem and instructions how to re-produce the problem?

    That would be really helpful in order to get that solved.

    Christian
    You'r welcome.
    Here are the conditions I can recount:
    - I have a spring graph open with a particular file
    - I have the same file open in the XML editor
    and then:
    - I modify the file in XML editor adding or removing a bean (not neccesarily throught the XML editor, also happens when updating from SVN)

    I'll try to provide a sample project and exact steps later next week or the week after that (we have a deadline nearing, and this is obv. a low priority issue for us).

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •