[udig-devel] R: Writing Data in GeoServer WFS Data Store

Jesse Eichar jeichar at refractions.net
Wed Oct 4 15:50:06 PDT 2006


So a couple of things.

1.  Make sure that you have one of the Geoserver 1.4.x versions  
installed
2.  Replace the gt2-main and the gt2-postgis jars with:
	- http://lists.refractions.net/m2/org/geotools/gt2-main/2.2.1- 
SNAPSHOT/gt2-main-2.2.1-SNAPSHOT.jar
	- http://lists.refractions.net/m2/org/geotools/gt2-postgis/2.2.1- 
SNAPSHOT/gt2-postgis-2.2.1-SNAPSHOT.jar

That should get the Geoserver up to date so that it will work  
correctly with uDig.  The reason for this is because Cory just made  
some fixes so that postgis is "smarter".

If you want uDig to be able to directly modify the postgis table you  
may need to replace the gt2-postgis and gt2-main jars in the udig 
\eclipse\plugins\net.refractions.udig.libs_1.1.0\lib directory  
(assuming you are on windows) with the same jars mentioned above.   
uDig and Geoserver use the same jars for accessing postgis.  So if  
you can add/edit features directly against the postgis using udig but  
not routed through a postGIS then you know that the Geoserver is not  
using the latest jars (which it isn't).

On that point Geoserver 1.4.something else is coming out soon and  
will have these fixes in it.

Jesse

On 4-Oct-06, at 2:26 PM, Stefano wrote:

> Hi Jesse,
> the featureSource is read and write; I can delete and update  
> feature but
> I can't create new feature. If I use the method
> "featureStore.addFeatures(featureCollection)" the Exception
> "java.io.IOException: An error occured while committing."	is
> generate if the DataSource is a GeoServer WFS.
>
>
> ------------------------------
>
> Date: Wed, 4 Oct 2006 09:15:39 -0700
> From: Jesse Eichar <jeichar at refractions.net>
> Subject: Re: [udig-devel] R:Writing Data in GeoServer WFS Data Store
> To: User-friendly Desktop Internet GIS
> 	<udig-devel at lists.refractions.net>
> Message-ID: <94DCB112-D153-4559-AF72-F23892089974 at refractions.net>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> HI Stefano,
>
> I don't recommend ever using FeatureWriters.  I use the FeatureSource/
> Store API exclusively.  You can call getFeatureSource() and do an
> instance check to see if it is a FeatureStore.  If it is then you
> know you can write to that DB.  If not then there is a configuration
> issue or the datastore is a read-only datastore.  (Postgis should
> usually provide a FeatureStore).
>
> Jesse
>
> On 4-Oct-06, at 3:36 AM, Stefano wrote:
>
>> Hi Jesse,
>> I try to use BigSerial instead of Big Int but but I've usual problem.
>> I try to insert a new record (feature without geometry) in this  
>> simple
>> table:
>>
>> create table Test(
>>  fid bigserial primary key,
>>  text varchar(100)
>> )
>>
>> but the usual exception will be generated when the next code is
>> execute:
>>
>> FeatureWriter fw =
>> featureStore.getDataStore().getFeatureWriterAppend
>> (featureType.getTypeNa
>> me(),featureStore.getTransaction());
>>
>> The exception is : "java.lang.UnsupportedOperationException: Schema
>> creation not supported"
>>
>> Thanks
>>
>> Stefano
>>
>> _______________________________________________
>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel



More information about the udig-devel mailing list