From: LSA <ls...@ng...> - 2010-03-07 08:45:35
|
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...@op...> 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. |