Select to view content in your preferred language

Updating feature's geometry ERRORS (10.2.0 - 10.2.1) ArcGIS Server, JAVA

768
1
02-14-2014 04:17 AM
CollinKleiboer
Regular Contributor
Hello,

I'm developing a SOE with JAVA.
I have a featureclass which must be updated.
I use the ITable.updateSearchedRows() method.
I'm developing in 10.2.1 and all goes well.

Now when I publish my SOE to a 10.2.0 ArcGIS Server, I'm getting a strange error:
AutomationException: Field is not editable.
I found out that it only occurs when updating the geometryfield (other fields succeed).
((ITable) fc).updateSearchedRows(qf, featureBuffer);


Also when I tried to create a workaround with an updateCursor, it still struggles on the geometry-field.
Example:
IFeatureCursor fcur = fc.IFeatureClass_update(qf, false);
IFeature feat2 = fcur.nextFeature(); 
feat2.setShapeByRef(feat2.getShapeCopy());
feat2.setValue(feat2.getFields().findField("FUNCTIONEEL_ID"), "testcollin1");
fcur.updateFeature(feat2);//errorline

AutomationException: Shape or row not found

I tried the IFeature.store() as well, but same result...

Both environments (10.2.0 and 10.2.1) have the same mapservice (published from the same mxd) and use the same DB-layers, so it's not a data thing.

Can it be that this is an issue in 10.2.0? And that it is being solved in 10.2.1?
Or is it just that a 10.2.1 JAR is not 100% working on a 10.2.0 environment?
I would like to know this before I might downgrade my dev.env. to the 10.2.0 version.

Regards,
Collin Kleiboer
GisSense
0 Kudos
1 Reply
LeoDonahue
Deactivated User
From the Java docs for Feature.getShape():

The basic process to change the shape of a feature is:
1) Get the feature's existing geometry through IFeature.ShapeCopy or create a new geometry
2) Modify the geometry
3) Set the feature's geometry using IFeature.Shape
4) Store the feature
All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.

Are you doing it this way?
0 Kudos