Eclipse 3.7 with NatTable 0.9 to Eclipse 4.2 with Nattable 1.0.0 [message #1064680] |
Thu, 20 June 2013 14:08 |
Ludwig Moser Messages: 476 Registered: July 2009 |
Senior Member |
|
|
Hello!
i moved my application from Eclipse 3.7 with NatTable 0.9 to Eclipse 4.2 with NatTable 1.0.0;
the bundles i created with my customized table were not touched/changed while moving to the newer versions.
so in 3.7 al was fine, now i get the exception below.
important notice:
the application starts as usual, also the table gets rendered ok.
i can add and remove columns, add filters etc.
the only thing i can NO MORE do is 'choose columns' - open the dialog which lets you choose the columns to display, thats where the exception gets raised...
java.lang.ClassNotFoundException: lumo.widgets.table.ColumnCategoriesModelProvider
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.io.ObjectInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at org.eclipse.nebula.widgets.nattable.util.ObjectCloner.deepCopy(ObjectCloner.java:41)
at org.eclipse.nebula.widgets.nattable.columnCategories.gui.AvailableColumnCategoriesProvider.<init>(AvailableColumnCategoriesProvider.java:34)
at org.eclipse.nebula.widgets.nattable.columnCategories.gui.ColumnCategoriesDialog.populateAvailableTree(ColumnCategoriesDialog.java:156)
at org.eclipse.nebula.widgets.nattable.columnCategories.gui.ColumnCategoriesDialog.populateDialogArea(ColumnCategoriesDialog.java:85)
at org.eclipse.nebula.widgets.nattable.columnChooser.gui.AbstractColumnChooserDialog.createDialogArea(AbstractColumnChooserDialog.java:56)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at org.eclipse.nebula.widgets.nattable.columnCategories.ChooseColumnsFromCategoriesCommandHandler.doCommand(ChooseColumnsFromCategoriesCommandHandler.java:65)
at org.eclipse.nebula.widgets.nattable.columnCategories.ChooseColumnsFromCategoriesCommandHandler.doCommand(ChooseColumnsFromCategoriesCommandHandler.java:1)
at org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler.doCommand(AbstractLayerCommandHandler.java:19)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.doCommand(AbstractLayer.java:154)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform.doCommand(AbstractLayerTransform.java:102)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommandOnChildLayer(GridLayer.java:109)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommandOnChildLayers(GridLayer.java:96)
at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.doCommand(CompositeLayer.java:137)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommand(GridLayer.java:178)
at org.eclipse.nebula.widgets.nattable.NatTable.doCommand(NatTable.java:516)
at org.eclipse.nebula.widgets.nattable.ui.menu.MenuItemProviders$14$1.widgetSelected(MenuItemProviders.java:468)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.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.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at at.biooffice.application.Application.start(Application.java:44)
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(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: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)
!ENTRY org.eclipse.ui 4 0 2013-06-20 15:48:31.099
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at org.eclipse.nebula.widgets.nattable.columnCategories.gui.AvailableColumnCategoriesProvider.hideEntries(AvailableColumnCategoriesProvider.java:43)
at org.eclipse.nebula.widgets.nattable.columnCategories.gui.ColumnCategoriesDialog.populateAvailableTree(ColumnCategoriesDialog.java:157)
at org.eclipse.nebula.widgets.nattable.columnCategories.gui.ColumnCategoriesDialog.populateDialogArea(ColumnCategoriesDialog.java:85)
at org.eclipse.nebula.widgets.nattable.columnChooser.gui.AbstractColumnChooserDialog.createDialogArea(AbstractColumnChooserDialog.java:56)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at org.eclipse.nebula.widgets.nattable.columnCategories.ChooseColumnsFromCategoriesCommandHandler.doCommand(ChooseColumnsFromCategoriesCommandHandler.java:65)
at org.eclipse.nebula.widgets.nattable.columnCategories.ChooseColumnsFromCategoriesCommandHandler.doCommand(ChooseColumnsFromCategoriesCommandHandler.java:1)
at org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler.doCommand(AbstractLayerCommandHandler.java:19)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.doCommand(AbstractLayer.java:154)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform.doCommand(AbstractLayerTransform.java:102)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommandOnChildLayer(GridLayer.java:109)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommandOnChildLayers(GridLayer.java:96)
at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.doCommand(CompositeLayer.java:137)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommand(GridLayer.java:178)
at org.eclipse.nebula.widgets.nattable.NatTable.doCommand(NatTable.java:516)
at org.eclipse.nebula.widgets.nattable.ui.menu.MenuItemProviders$14$1.widgetSelected(MenuItemProviders.java:468)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.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.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at at.biooffice.application.Application.start(Application.java:44)
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(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: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)
the class lumo.widgets.table.ColumnCategoriesModelProvider is in the same bundle, even in the same package (!) as my customized table class!
the stacktrace tells (me) nothing as at.biooffice.application.Application.start(Application.java:44) is simply
final int returnCode = PlatformUI.createAndRunWorkbench(display,
new ApplicationWorkbenchAdvisor());
you guys are my last hope to get this thing working again...
thanks in advance
lumo
EDIT: if you need any more information let me know
see screenshot
[Updated on: Thu, 20 June 2013 14:29] Report message to a moderator
|
|
|
|
Re: Eclipse 3.7 with NatTable 0.9 to Eclipse 4.2 with Nattable 1.0.0 [message #1064779 is a reply to message #1064700] |
Fri, 21 June 2013 05:07 |
Ludwig Moser Messages: 476 Registered: July 2009 |
Senior Member |
|
|
Dirk,
i just tried to switch back to 0.9 (i just pointed to the 0.9 jars in my target platform) on Eclipse 4.2 and its exactly the same exception.
so it must be the switch from E3.7 to E4.2.
buddy policy in my manifest. declare nattable as buddy in the bundle which defines my custom table?
EDIT: adding
Eclipse-BuddyPolicy: dependent to my bundle (the one which includes the custom table code) did not resolve the problem (or is this the wrong place)
[Updated on: Fri, 21 June 2013 05:19] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Eclipse 3.7 with NatTable 0.9 to Eclipse 4.2 with Nattable 1.0.0 [message #1065400 is a reply to message #1065389] |
Tue, 25 June 2013 14:53 |
Ludwig Moser Messages: 476 Registered: July 2009 |
Senior Member |
|
|
i have a FieldInfoCollection (collection of informations on fields displayed in table and formular)
from this flat collection i generate my ColumnCategoriesModel.
it creates a Java-Object tree representation of my Data (from flat table)
eg: Person with Address:
Person.firstName
Person.lastName
Person.Address.street
Person.Address.country
etc...
this is built into the tree:
Person
+firstName
+lastName
->Address
+street
+country
here is my ColumnCategoriesModelProvider:
package lumo.widgets.table;
import java.util.HashMap;
public class ColumnCategoriesModelProvider extends ColumnCategoriesModel {
private static final long serialVersionUID = 1001L;
public ColumnCategoriesModelProvider(FieldInfoCollection fiCollection) {
String cls = fiCollection.get(0).getSimpleClassName();
Node root = addRootCategory(cls);
Map<String, Node> mapping = new HashMap<String, Node>();
List<FieldInfo> infos = fiCollection.getAll();
for (int i = 0; i < infos.size(); i++) {
FieldInfo fi = infos.get(i);
String nodeName = cls+"."+fi.getInternal();
String[] split = nodeName.split("\\.");
Node parentCategory = root;
for (int j = 0; j < split.length; j++) {
if (j < split.length - 1) {
// its no leaf yet
Node n = mapping.get(split[j].toLowerCase());
if (n == null) {
n = addCategory(parentCategory, ColumnCategoriesModelProvider.capitaliseFirstLetter(split[j]));
mapping.put(split[j].toLowerCase(), n);
}
parentCategory = n;
} else {
addColumnsToCategory(parentCategory, fi.getIndex());
break;
}
}
while (parentCategory!=root) {
parentCategory = parentCategory.getParent();
}
}
}
public static String capitaliseFirstLetter(String string) {
return string.substring(0, 1).toUpperCase() + string.substring(1);
}
/**
* Method to join array elements of type string
*
* @author lumo
* @param inputArray
* Array which contains strings
* @param toIndex
* to the position of the array - stops here
* @param glueString
* String between each array element
* @return String containing all array elements seperated by glue string
*/
public static String implode(String[] inputArray, int toIndex,
String glueString) {
String output = "";
if (toIndex >= inputArray.length) {
throw new IndexOutOfBoundsException(
"You tried to Implode an Array to an Index, which is outside of the Size of the given Array.");
}
if (inputArray.length > 0) {
StringBuilder sb = new StringBuilder();
sb.append(inputArray[0]);
for (int i = 1; i <= toIndex; i++) {
sb.append(glueString);
sb.append(inputArray[i]);
}
output = sb.toString();
}
return output;
}
}
i am open to any other solutions!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02923 seconds