[udig-devel] Create Polygon Geometries

Jesse Eichar jeichar at refractions.net
Tue Oct 30 10:08:00 PDT 2007


Hi I know exactly the problem.

The postgis has a restraint on one of the columns that it can not be  
null and uDig is not respecting that.  A quick fix is to remove that  
restraint on the postgis column.  But in the long term this is a bug  
with Geotools and a bug report will need to be filled out with  
geotools to fix this issue.

Jesse

On Oct 30, 2007, at 10:04 AM, Kurucz Péter wrote:

> Hi,
>
> I try to use thy uDig (version 1.1-RC12) and I got a problem. It is  
> not possible to create a new polygon. The drawing is working but  
> the new polygon will not be saved in the postGIS database. I have  
> downloaded the eclipse environment and debugged a bit the tool. My  
> feeling is that the problem isn't located in uDig application but  
> in a bottom layer in postGIS or pastrgres. I suppose that a  
> database transaction will not be closed correctly or not at all,  
> and the tool want to make a new one, and this occur a database  
> exception. The whole transaction will be rollbacked and my new  
> polygon will miss from GUI.
> The strange thing is that Create Polygon must be a basic feature  
> but i t doesn't work for me. Have anybody idea what can be bad? Is  
> my feeling is right about database transaction error?
>
> Thanks in advance!
> P
>
> The exception is following:
> 2007.10.30. 17:54:15 org.geotools.data.jdbc.JDBCTextFeatureWriter  
> doInsert
>
> SEVERE: SQL Exception writing geometry columnERROR: null value in  
> column "customer_id" violates not-null constraint
>
> org.postgresql.ut il.PSQLException: ERROR: null value in column  
> "customer_id" violates not-null constraint
>
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse 
> (QueryExecutorImpl.java:1525)
>
> at org.postgresql.core.v3.QueryExecutorImpl.processResults 
> (QueryExecutorImpl.java:1309)
>
> at org.postgresql.core.v3.QueryExecutorImpl.execute 
> (QueryExecutorImpl.java:188)
>
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute 
> (AbstractJdbc2S tatement.java:452)
>
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags 
> (AbstractJdbc2Statement.java:340)
>
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate 
> (AbstractJdbc2Statement.java:286)
>
> 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.postgresql.ds.common.PooledConnectionImpl 
> $StatementHandler.invoke(PooledConnectionImpl.java:474)
>
> at $Proxy1.executeUpdate(Unknown Source)
>
> at org.geotools.data.jdbc.JDBCTextFeatureWriter.doInsert 
> (JDBCTextFeatureWriter.java:110)
>
> at org.geotools.data.jdbc.JDBCFeatureWriter.write 
> (JDBCFeatureWriter.java:220)
>
> at org.geotools.data.InProce ssLockingManager$1.write 
> (InProcessLockingManager.java:331)
>
> at org.geotools.data.jdbc.JDBCFeatureStore.addFeatures 
> (JDBCFeatureStore.java:400)
>
> at  
> net.refractions.udig.project.internal.impl.UDIGFeatureStore.addFeature 
> s(UDIGFeatureStore.java:163)
>
> at  
> net.refractions.udig.project.internal.commands.edit.AddFeatureCommand. 
> run(AddFeatureCommand.java:120)
>
> at  
> net.refractions.udig.tools.edit.commands.CreateAndSetNewFeature.run 
> (CreateAndSetNewFeature.java:67)
>
> at net.refractions.udig.project.command.UndoableComposite.execute 
> (UndoableComposite.java:81)
>
> at net.refractions.udig.tools.edit.BehaviourCommand.execute 
> (BehaviourCommand.java:65)
>
> at net.refractions.udig.project.command.UndoableComposite.execute 
> (UndoableComposite.java:78)
>
> at  
> net.refractions.udig.tools.edit.behaviour.AcceptWhenOverFirstVertexBeh 
> aviour.getCommand(AcceptWhenOverFirstVertexBehaviour.java:87)
>
> at  
> net.refractions.udig.tools.edit.OrderedCompositeEventBehavior.getComma 
> nd(OrderedCompositeEventBehavior.java:59)
>
> at  
> net.refractions.udig.tools.edit.MutualExclusiveEventBehavior.getComman 
> d(MutualExclusiveEventBehavior.java:57)
>
> at  
> net.refractions.udig.tools.edit.EditToolHandler.runEventBehaviours 
> (EditToolHandler.java:269)
>
> at net.refractions.udig.tools.edit.EditToolHandler.handleEvent 
> (EditToolHandler.java:229)
>
> at net.refractions.udig.tools.edit.AbstractEditTool.onMouseReleased 
> (AbstractEditTool.java:250)
>
> at net.refractions.udig.project.ui.tool.SimpleTool.mouseReleased 
> (SimpleTool.java:153)
>
> at  
> net.refractions.udig.project.ui.internal.render.displayAdapter.impl.Ev 
> entJob.sendMouseReleased(EventJob.java:296)
>
> at  
> net.refractions.udig.project.ui.internal.render.displayAdapter.impl.Ev 
> entJob.runEvent(EventJob.java:87)
>
> at  
> net.refractions.udig.project.ui.internal.render.displayAdapter.impl.Ev 
> entJob.access$2(EventJob.java:72)
>
> at  
> net.refractions.udig.project.ui.internal.render.displayAdapter.impl.Ev 
> entJob$1.run(EventJob.java:135)
>
> at org.eclipse.swt.widgets.Display.runTimer(Display.java:3745)
>
> at org.eclipse.swt.widgets.Display.messageProc(Display.java:2967)< /p>
>
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
>
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2265)
>
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3291)
>
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
>
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.j ava:2353)
>
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
>
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
>
> at org.eclipse.core.databinding.observable.Realm.runWithDefault 
> (Realm.java:289)
>
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench 
> (Workbench.java:461)
>
> at org.eclipse.ui.Platfo rmUI.createAndRunWorkbench(PlatformUI.java: 
> 149)
>
> at net.refractions.udig.internal.ui.UDIGApplication.run 
> (UDIGApplication.java:41)
>
> 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.e quinox.internal.app.EclipseAppContainer.callMethod 
> (EclipseAppContainer.java:572)
>
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run 
> (EclipseAppHandle.java:171)
>
> at  
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplic 
> ation(EclipseAppLauncher.java:106)
>
> at  
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start 
> (EclipseAppLauncher.java:76)
>
> at org.eclipse.core.runtime.adaptor.EclipseStarter .run 
> (EclipseStarter.java:363)
>
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run 
> (EclipseStarter.java:176)
>
> 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.Mai n.invokeFramework(Main.java:508)
>
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
>
> at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
>
> at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
>
> 2007.10.30. 17:54:15 org.geotools.data.jdbc.JDBCFeatureWriter close
>
> WARNING: Feature writer calling close when queryData is already closed
>
>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20071030/c829f6cf/attachment-0001.html


More information about the udig-devel mailing list