Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Null Pointer Exception when adding new data to eventlist(Getting null pointer exception when i am inserting a new data row to my eventlist)
Null Pointer Exception when adding new data to eventlist [message #1786450] Thu, 03 May 2018 13:35 Go to next message
Shreya Suman is currently offline Shreya SumanFriend
Messages: 2
Registered: March 2017
Junior Member
Hello Experts,
When i am trying to add a new row to my nattable eventlist using below code:
((EventList<FVESINatTableData>) eventList).add(insertIndex, (FVESINatTableData) object);

i am getting below error.

ERROR: 18:36:59,267 - TcLogger$IC_LogListener.logging:?
org.eclipse.core.runtime - org.eclipse.ui - 0 - Unhandled event loop exception
java.lang.NullPointerException
at java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:321)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:184)
at java.util.Arrays.sort(Arrays.java:1312)
at java.util.Arrays.sort(Arrays.java:1506)
at java.util.ArrayList.sort(ArrayList.java:1454)
at java.util.Collections.sort(Collections.java:141)
at org.eclipse.nebula.widgets.nattable.filterrow.combobox.FilterRowComboBoxDataProvider.collectValues(FilterRowComboBoxDataProvider.java:130)
at org.eclipse.nebula.widgets.nattable.filterrow.combobox.FilterRowComboBoxDataProvider.buildValueCache(FilterRowComboBoxDataProvider.java:99)
at org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.GlazedListsFilterRowComboBoxDataProvider.listChanged(GlazedListsFilterRowComboBoxDataProvider.java:84)
at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:412)
at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:409)
at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:316)
at ca.odell.glazedlists.BasicEventList.add(BasicEventList.java:129)
at com.teamcenter.rac.nat.handlers.FVESIInsertDeviceRowMenuListener.updateTableContent(FVESIInsertDeviceRowMenuListener.java:516)
at com.teamcenter.rac.nat.handlers.FVESIInsertDeviceRowMenuListener.addGroundCircuit(FVESIInsertDeviceRowMenuListener.java:342)
at com.teamcenter.rac.nat.handlers.FVESIInsertDeviceRowMenuListener.handleEvent(FVESIInsertDeviceRowMenuListener.java:248)
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:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.teamcenter.rac.aifrcp.Application.runApplication(Unknown Source)
at com.teamcenter.rac.aifrcp.Application.start(Unknown Source)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)


Has anyone else faced similar error. any pointer will be really helpful.

thanks in advance.

[Updated on: Thu, 03 May 2018 13:38]

Report message to a moderator

Re: Null Pointer Exception when adding new data to eventlist [message #1786452 is a reply to message #1786450] Thu, 03 May 2018 13:43 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2614
Registered: July 2012
Senior Member
The FilterRowComboBoxDataProvider is building a sorted list of available values for the combobox. And a null value is added to that list which is causing the NPE. But in the current codebase there is a null check to avoid this.

Which version of NatTable do you use? If I am not missing anything, that was fixed years ago.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=454505
Previous Topic:GAP between the custom image and base content with background image
Next Topic:Possible Bug in CompositeFreezeLayer
Goto Forum:
  


Current Time: Sun Sep 23 00:40:33 GMT 2018

Powered by FUDForum. Page generated in 0.01447 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top