Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Exception while dispatching event org.osgi.service.event.Event (unexplainable exception while calling viewer.setInput())
Exception while dispatching event org.osgi.service.event.Event [message #1269389] Tue, 11 March 2014 16:12 Go to next message
Frank Schaare is currently offline Frank Schaare
Messages: 8
Registered: July 2009
Junior Member
i have a model created by handler calling a declarative service.
a part is generated fom partdescriptor. When the handler has created the model, he passes the model to the part:
broker.send(Topics.AZV_WEBSERVICE, azvDaten);

The part recieves the model:
@Inject @Optional
public void handleEvent(@UIEventTopic(Topics.AZV_WEBSERVICE) AZVDaten incoming)
	{
	this.azvDaten = incoming;	
        azvViewer.setInput(this.azvDaten)
	}	

The model is definatly not null, neither any other injections. Debugged the whole day, without any ideas left. Please help.

!ENTRY org.eclipse.equinox.event 4 0 2014-03-11 20:46:56.507
!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=AZV/Webservice/Daten] to handler org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler@293d6af1
!STACK 0
org.eclipse.e4.core.di.InjectionException: org.eclipse.core.runtime.AssertionFailedException: null argument:
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
	at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:49)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205)
	at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:47)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80)
	at de.hannit.fsch.rcp.klr.handler.azv.ExuecuteAZVServiceHandler.execute(ExuecuteAZVServiceHandler.java:64)
	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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:850)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:743)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:727)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:662)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:162)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	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:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
	at org.eclipse.jface.viewers.StructuredViewer.assertElementsNotNull(StructuredViewer.java:599)
	at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1011)
	at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:721)
	at org.eclipse.jface.viewers.AbstractTableViewer.getRawChildren(AbstractTableViewer.java:1090)
	at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917)
	at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:1067)
	at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:702)
	at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:650)
	at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:637)
	at org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:593)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
	at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:591)
	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
	at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
	at de.hannit.fsch.rcp.klr.parts.AZVWebServicePart.updateControls(AZVWebServicePart.java:62)
	at de.hannit.fsch.rcp.klr.parts.AZVWebServicePart.handleEvent(AZVWebServicePart.java:51)
	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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 53 more

Re: Exception while dispatching event org.osgi.service.event.Event [message #1269799 is a reply to message #1269389] Wed, 12 March 2014 03:50 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5228
Registered: July 2009
Senior Member
The input is not be null but one of the elements in the array returned
from your content provider getElements(root) is NULL which is not
allowed in JFace-Viewers!

Tom

On 11.03.14 21:12, Frank Schaare wrote:
> i have a model created by handler calling a declarative service.
> a part is generated fom partdescriptor. When the handler has created the
> model, he passes the model to the part:
>
> broker.send(Topics.AZV_WEBSERVICE, azvDaten);
>
> The part recieves the model:
>
> @Inject @Optional
> public void handleEvent(@UIEventTopic(Topics.AZV_WEBSERVICE) AZVDaten
> incoming)
> {
> this.azvDaten = incoming;
> azvViewer.setInput(this.azvDaten)
> }
>
> The model is definatly not null, neither any other injections. Debugged
> the whole day, without any ideas left. Please help.
>
>
> !ENTRY org.eclipse.equinox.event 4 0 2014-03-11 20:46:56.507
> !MESSAGE Exception while dispatching event org.osgi.service.event.Event
> [topic=AZV/Webservice/Daten] to handler
> org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler@293d6af1
> !STACK 0
> org.eclipse.e4.core.di.InjectionException:
> org.eclipse.core.runtime.AssertionFailedException: null argument:
> at
> org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
>
> at
> org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:49)
>
> at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
> at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688)
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205)
>
> at
> org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:47)
>
> at
> org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
>
> at
> org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
>
> at
> org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
>
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>
> at
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>
> at
> org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
>
> at
> org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
>
> at
> org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
>
> at
> org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80)
>
> at
> de.hannit.fsch.rcp.klr.handler.azv.ExuecuteAZVServiceHandler.execute(ExuecuteAZVServiceHandler.java:64)
>
> 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
>
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
>
> at
> org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
>
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:850)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:743)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:727)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:662)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:162)
>
> 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:354)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
>
> 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:636)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
> argument:
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
> at
> org.eclipse.jface.viewers.StructuredViewer.assertElementsNotNull(StructuredViewer.java:599)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1011)
>
> at
> org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:721)
>
> at
> org.eclipse.jface.viewers.AbstractTableViewer.getRawChildren(AbstractTableViewer.java:1090)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:1067)
>
> at
> org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:702)
>
> at
> org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:650)
>
> at
> org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:637)
>
> at
> org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:593)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
>
> at
> org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:591)
>
> at
> org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
> at
> org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
>
> at
> de.hannit.fsch.rcp.klr.parts.AZVWebServicePart.updateControls(AZVWebServicePart.java:62)
>
> at
> de.hannit.fsch.rcp.klr.parts.AZVWebServicePart.handleEvent(AZVWebServicePart.java:51)
>
> 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
>
> ... 53 more
>
>
Re: Exception while dispatching event org.osgi.service.event.Event [message #1270183 is a reply to message #1269799] Wed, 12 March 2014 12:25 Go to previous message
Frank Schaare is currently offline Frank Schaare
Messages: 8
Registered: July 2009
Junior Member
Hi Tom,
Thomas Schindl wrote on Wed, 12 March 2014 03:50
The input is not be null but one of the elements in the array returned
from your content provider getElements(root) is NULL which is not
allowed in JFace-Viewers!

Tom
>

yes, my ArrayList, which holds the the model values, had 'steps' with null-values.
Took me two days of my life, to find this, but after all, this is solved.

Thanks for your reply and particularly for your awesome javaFX project. Going to migrate to a JavaFX renderer as soon the e4 support for Java 8 is stable
Previous Topic:save state of navigation history on close of workbench
Next Topic:org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler
Goto Forum:
  


Current Time: Wed Jul 23 06:09:41 EDT 2014

Powered by FUDForum. Page generated in 0.02483 seconds