Error Code 500 when using arcgis 10 html form to test Add Features

9358
10
11-16-2010 10:18 AM
LawrenceSullivan
New Contributor II
Hi,
I am trying to add an array of features to my feature layer using the HTML form that is provided with ArcGIS 10 server for testing.

Here is the JSON I am posting:
[
    {
      "geometry" : {
        "x" : 485957.69069999998,
        "y" : 4985021.4280000003
      },
      "attributes" : {
        "ADD_ID_NAT" : "02396435-ADDR0009999",
        "ADD_ID_LOC" : "ADDR0009999",
        "ANUMBER" : 25759,
        "ST_NAME" : "Fairview TEST TEST TEST",
        "ST_POS_TYP" : "Avenue",
        "ST_POS_DIR" : "North",
        "SUB_TYPE1" : "Unit",
        "SUB_ID1" : "250",
        "MUNI_NAME" : "Roseville",
        "MUNI_CODE" : "02396435",
        "USPS_PLACE" : "Roseville",
        "CO_CODE" : "123",
        "CO_NAME" : "Ramsey",
        "STATE_CODE" : "MN",
        "ZIP" : "55113",
        "RESIDENCE" : "No",
        "STATUS" : "A",
        "PIN" : "092923210009",
        "LONGITUDE" : -93.178224684,
        "LATITUDE" : 45.018504147500003,
        "POSI_ACCU" : 3,
        "ADIRSOURCE" : "Community Development",
        "AAUTHORITY" : "City of Roseville",
        "EDIT_ORG" : "City of Roseville",
        "UPDATEDATE" : 1289692800,
        "COMMENTS" : "test test test test"
      }
    }
]

Here is the error response:
{
  "error" :
  {
    "code" : 500,
    "message" : "An unexpected error occurred processing the request.",
    "details" : []
  }
}


I checked the log and the only info in it was   Method failed.HRESULT = 0x8004152a. This is unrelated. I got this error while doing a query on zip codes.  I can find no more details regarding my attemp to add features.

I have been able to update features from both my Silverlight client and the HTML test form...so I thought adding a feature would require very little effort.

Am I missing something obvious?
Any help would be greatly appreciated.

TIA,
Larry
10 Replies
RicoLelina
New Contributor
Your input seems to be valid. I have a similar issue where once in a while I get Error Code 403 (HTTP Error 403 Forbidden - This indicates a fundamental access problem, which may be difficult to resolve because the HTTP protocol allows the Web server to give this response without providing any reason at all. So the 403 error is equivalent to a blanket 'NO' by the Web server - with no further discussion allowed.). I know my input is perfectly fine because when I resend the request, it works as expected.
0 Kudos
LawrenceSullivan
New Contributor II
Does the problem clear up by itself or do you have to take a specific action to fix it...
I am starting to get desperate. I had to harass my system admin to look at the log to see if there was anymore error details...(he claimed Arc Server doesn't have any logs).
0 Kudos
RicoLelina
New Contributor
The 403 error happens once in a while and it seems to clear up by just retrying the request. I looked at the ArcGIS server logs, Microsoft IIS logs and event view -- I don't see an error pertinent to the 403 response to my request.

By the way, I'm accessing the REST service via a .jspx page and not the provided html test page.
0 Kudos
LawrenceSullivan
New Contributor II
Well, I just convinced the sys admin to change logging to VERBOSE and I re-ran my above sample JSON snippet and got this message:

{
  "error" :
  {
    "code" : 400,
    "message" : "Unable to complete  operation.",
    "details" : [
      "Unable to add features"
    ]
  }
}

OK...unable to add features...but WHY? Any ESRI pros care to comment???
0 Kudos
LawrenceSullivan
New Contributor II
For some reason the feature service stopped working around noon EST.
We restarted it.
I looked into the logs again and now I found the following:

Input Features Information: (LayerOrTableID, OID) Array = {(0, -1)}
Using MultiuserEditSessionMode: esriMESMNonVersioned.
Error while creating Insert Cursor for Layer: ADDRESS_POINTS.
Error while Performing Edit Operation for GraphicFeatureServer.Add.
Aborted the Edit operation.
0 Kudos
RaviNarayanan
Esri Contributor
Hi Lawrence,

Does this service contain any layers that are part of non-simple types such as geometry networks or topologies? in such case, the data may need to be published as versioned.

please see this help topic.
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005300000011000000.htm

Can you try publishig a  copy of this data that is versioned and verify if editing works?

Ravi
0 Kudos
LawrenceSullivan
New Contributor II
Hi Ravi,

I did not create the Feature Service so I am asking my Project Manager who did create it.
I will post a response when I get some more info.

Thanks for chiming in.

Larry
0 Kudos
LawrenceSullivan
New Contributor II
Okay, I talked to my project manager and he said, "there is no topology, no versioning, and the map document has had the 'Edit a version of the database with the ability to undo and redo' unchecked. "

Remember we CAN do edits through the REST interface...it's trying to add a feature where we get the problems...
0 Kudos
RaviNarayanan
Esri Contributor
Lawrence,

Can you also make sure the field names and their values are valid. In the JSON feature that is posted for editing, make sure the all fields names listed are valid. Also make sure field values match the field type. For example SUD_ID1 is represented as a string in the JSON. Verify that its field is not a number.
"SUB_ID1" : "250",

Also as I suggested in the earlier post, published a copy of this dataset that is versioned and verify if editing works?
0 Kudos