Hello We are trying to make an WFS-T insert but we get an "java.io.IOException: An error occured while committing" error. We cant figure it out, so thanks in advance if you could help. We are working with geotools 2.3.3 and geoserver 1.5.3. Here is the code we're using:
String getCapabilities = "http://192.168.7.126/geoserver/wfs?request=GetCapabilities"; WFSDataStore ds = DataStoreUtil.createWFSDataStore(getCapabilities); WFSFeatureStore store = new WFSFeatureStore(ds,"sit:ouvragesig"); Transaction tx = new DefaultTransaction("insert"); store.setTransaction(tx); FeatureType schema = store.getSchema(); WKTReader reader = new WKTReader(); Geometry geom = reader.read("POINT(-150 -17)"); Feature feat = schema.create(null,"testid"); feat.setAttribute("nom","Test"); feat.setAttribute("genre","test"); feat.setDefaultGeometry(geom); store.addFeatures(new CollectionFeatureReader(new Feature[]{feat})); tx.commit(); // Here is the error Regards yves -- View this message in context: http://www.nabble.com/WFS-T-insert-error-during-commiting-tf4345224.html#a12379401 Sent from the geotools-gt2-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
