uDIG

IllegalArgumentException on new layer creation

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: UDIG 1.2.M0
  • Fix Version/s: UDIG 1.2.M6
  • Component/s: framework
  • Labels:
    None
  • Environment:
    linux ubuntu

Description

I found a problem creating a new shapefile in uDig-trunk.
Simply go in the menu -> layer -> create nothing happens and returns the attached error.

Just to report it...

Is here the right place where to report the uDig-trunk bugs? or should I do something else Thanks in advance - Silvia

java.lang.IllegalArgumentException: null is not an existing attribute descriptor in this builder
at org.geotools.feature.simple.SimpleFeatureTypeBuilder.remove(SimpleFeatureTypeBuilder.java:685)
at net.refractions.udig.project.ui.internal.actions.NewLayerAction.setDefaultGeomType(NewLayerAction.java:124)
at net.refractions.udig.project.ui.internal.actions.NewLayerAction.runWithEvent(NewLayerAction.java:78)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
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)

Activity

Hide
Jody Garnett added a comment -
Here is fine; I will have a look.
Show
Jody Garnett added a comment - Here is fine; I will have a look.
Hide
Andrea Antonello added a comment -
I have the problem also on macosx.
Select a layer from the loaded ones and hit layer->create:

java.lang.IllegalArgumentException: null is not an existing attribute descriptor in this builder etc etc

Instead if no layer is selected, the dialog opens. But, try to change the type of name to double. I get:

java.lang.ClassCastException: java.lang.String
at net.refractions.udig.ui.FeatureTypeEditor$AttributeCellModifier.createNewAttributeType(FeatureTypeEditor.java:680)
at net.refractions.udig.ui.FeatureTypeEditor$AttributeCellModifier.modify(FeatureTypeEditor.java:659)
at org.eclipse.jface.viewers.ColumnViewer$2.setValue(ColumnViewer.java:274)
at org.eclipse.jface.viewers.EditingSupport.saveCellEditorValue(EditingSupport.java:109)
at org.eclipse.jface.viewers.ColumnViewerEditor.saveEditorValue(ColumnViewerEditor.java:454)
at org.eclipse.jface.viewers.ColumnViewerEditor.applyEditorValue(ColumnViewerEditor.java:311)
at org.eclipse.jface.viewers.ColumnViewerEditor$3.focusLost(ColumnViewerEditor.java:215)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at org.eclipse.swt.custom.CCombo.handleFocus(CCombo.java:816)
at org.eclipse.swt.custom.CCombo$3.handleEvent(CCombo.java:135)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1130)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1560)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1566)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2938)
at org.eclipse.swt.widgets.Control.kEventControlSetFocusPart(Control.java:2061)
at org.eclipse.swt.widgets.Composite.kEventControlSetFocusPart(Composite.java:533)
at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:374)
at org.eclipse.swt.widgets.Display.controlProc(Display.java:862)
at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Native Method)
at org.eclipse.swt.widgets.Tree.kEventMouseDown(Tree.java:2599)
at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1326)
at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2925)
at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3047)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at net.refractions.udig.ui.FeatureTypeEditorDialog.open(FeatureTypeEditorDialog.java:184)
at net.refractions.udig.project.ui.internal.actions.NewLayerAction.runWithEvent(NewLayerAction.java:81)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
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:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3474)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3064)
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 net.refractions.udig.internal.ui.UDIGApplication.start(UDIGApplication.java:82)
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:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Show
Andrea Antonello added a comment - I have the problem also on macosx. Select a layer from the loaded ones and hit layer->create: java.lang.IllegalArgumentException: null is not an existing attribute descriptor in this builder etc etc Instead if no layer is selected, the dialog opens. But, try to change the type of name to double. I get: java.lang.ClassCastException: java.lang.String at net.refractions.udig.ui.FeatureTypeEditor$AttributeCellModifier.createNewAttributeType(FeatureTypeEditor.java:680) at net.refractions.udig.ui.FeatureTypeEditor$AttributeCellModifier.modify(FeatureTypeEditor.java:659) at org.eclipse.jface.viewers.ColumnViewer$2.setValue(ColumnViewer.java:274) at org.eclipse.jface.viewers.EditingSupport.saveCellEditorValue(EditingSupport.java:109) at org.eclipse.jface.viewers.ColumnViewerEditor.saveEditorValue(ColumnViewerEditor.java:454) at org.eclipse.jface.viewers.ColumnViewerEditor.applyEditorValue(ColumnViewerEditor.java:311) at org.eclipse.jface.viewers.ColumnViewerEditor$3.focusLost(ColumnViewerEditor.java:215) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360) at org.eclipse.swt.custom.CCombo.handleFocus(CCombo.java:816) at org.eclipse.swt.custom.CCombo$3.handleEvent(CCombo.java:135) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1130) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1560) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1566) at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2938) at org.eclipse.swt.widgets.Control.kEventControlSetFocusPart(Control.java:2061) at org.eclipse.swt.widgets.Composite.kEventControlSetFocusPart(Composite.java:533) at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:374) at org.eclipse.swt.widgets.Display.controlProc(Display.java:862) at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Native Method) at org.eclipse.swt.widgets.Tree.kEventMouseDown(Tree.java:2599) at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1326) at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2925) at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3047) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at net.refractions.udig.ui.FeatureTypeEditorDialog.open(FeatureTypeEditorDialog.java:184) at net.refractions.udig.project.ui.internal.actions.NewLayerAction.runWithEvent(NewLayerAction.java:81) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) 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:1561) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3474) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3064) 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 net.refractions.udig.internal.ui.UDIGApplication.start(UDIGApplication.java:82) 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:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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) at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Hide
Jody Garnett added a comment -
From email:

still have problem with the Layer -> create:
- nothing will appear if it is selected an existing layer
- if you have selected in the layer view a non shapefile layer the tool works except for that it has the default projection WGS84
Show
Jody Garnett added a comment - From email: still have problem with the Layer -> create: - nothing will appear if it is selected an existing layer - if you have selected in the layer view a non shapefile layer the tool works except for that it has the default projection WGS84
Hide
Jody Garnett added a comment -
I was able to fix the handling of java Bindings; now only the add/remove attribute buttons fail for me.
Show
Jody Garnett added a comment - I was able to fix the handling of java Bindings; now only the add/remove attribute buttons fail for me.
Hide
Jody Garnett added a comment -
bug brought forward to UDIG1.2.M4 visibility
Show
Jody Garnett added a comment - bug brought forward to UDIG1.2.M4 visibility
Hide
James Groffen added a comment -
Looks like layer creation works now, but noticed the following while trying it out:

1: Refresh problem

Create New Layer window gets a refresh error when clicking around the attribute list.

  1 from the menu - Layer->Create
  2 click on "geometry" in the name column
  3 click on the "LineString" in the type column
  4 attribute list will dissapear, but you can click on the new layer name or add an attribute and you should be able to get the list back.

Seems to mainly happen when clicking between fields for the same attribute.

2: Context menu behavior

The context menu for the attribute list has add and delete attribute options:

- The add attribute option has no text, only an icon.
- Right clicking on an attribute lets you delete it. Right clicking somewhere else (not on an attribute) still allows you to select 'delete'. If you do and an attribute is selected it will be removed from the list. If nothing is selected then nothing happens. Not sure if this is how it's supposed to behave.

Show
James Groffen added a comment - Looks like layer creation works now, but noticed the following while trying it out: 1: Refresh problem Create New Layer window gets a refresh error when clicking around the attribute list.   1 from the menu - Layer->Create   2 click on "geometry" in the name column   3 click on the "LineString" in the type column   4 attribute list will dissapear, but you can click on the new layer name or add an attribute and you should be able to get the list back. Seems to mainly happen when clicking between fields for the same attribute. 2: Context menu behavior The context menu for the attribute list has add and delete attribute options: - The add attribute option has no text, only an icon. - Right clicking on an attribute lets you delete it. Right clicking somewhere else (not on an attribute) still allows you to select 'delete'. If you do and an attribute is selected it will be removed from the list. If nothing is selected then nothing happens. Not sure if this is how it's supposed to behave.
Hide
Silvia Franceschi added a comment -
1. Refresh problem
seems to be a platform dependent issue, I don't have any problem in Linux 64 bits but I have it in Windows 32bit
Show
Silvia Franceschi added a comment - 1. Refresh problem seems to be a platform dependent issue, I don't have any problem in Linux 64 bits but I have it in Windows 32bit

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: