I have created sample code reproducing the issue.

Here is the source:
http://sites.google.com/site/lattati/downloads/ShapeRenderer.java?attredirects=0&d=1
Sample shapefile (required to repproduce):
http://sites.google.com/site/lattati/downloads/RUS_rds.zip?attredirects=0&d=1
Exception log:
http://sites.google.com/site/lattati/downloads/exception.log.txt?attredirects=0&d=1

One will need to download the source and data, place data 
somewhere and change the variable
private static String DATA_PATH = 
"c:/temp/data/RUS_roads.shp";

In order to reproduce, one can click on "Change data" 
button.

Then one can obtain exception log like one mentioned 
before.

Still hoping someone will explain for me what is wrong 
with my code...

Thanks,
Sergey

On Sat, 06 Mar 2010 15:19:39 +0100
  Andrea Aime <aa...@opengeo.org> wrote:
> LSA ha scritto:
>> Interesting point, Jody!
>> 
>> I am using it like the following:
>> Transaction updateTrans = new 
>> DefaultTransaction("update");
>> FeatureWriter<SimpleFeatureType, SimpleFeature> writer =
>> featureStore.getDataStore()
>>       .getFeatureWriter(featureStore.getDataStore().getTypeNames()[0],
>>           new 
>> FidFilterImpl(changedFeautureId2Feature.keySet()),
>> updateTrans);
>> for (; writer.hasNext();) {
>>     SimpleFeature feature2Update = writer.next();
>>     // ...
>>     // ...
>>     // here I change the feature2Update
>>     // ...
>>     // ...
>>     writer.write();
>> }
>> writer.close();
>> updateTrans.commit();
>> updateTrans.close();
> 
> I don't see anything wrong with this code... Can you 
>cook up
> a self contained example, a java main, plus a shapefile, 
>that
> exhibits the failure?
> 
> Cheers
> Andrea
> 
> -- 
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to