Select to view content in your preferred language

GeoEvent: Failure to Import or Synchronize GeoFences

924
1
11-07-2019 02:47 PM
EricIronside
Esri Regular Contributor
1 1 924

Under very specific situations, the import or synchronization of GeoFences within GeoEvent will fail. This blog details the symptoms and provides a workaround.

The Issue: Failing to Import/Synchronize GeoFences

I recently attempted to import some GeoFences from a Feature Service using a field other than the ObjectID field as the Name Field. In my case the Category Field was hardcoded to "HEX" and the Name Field was a string field called 'Name'. the error I get back is a java.lang.NullPointerException.

Looking in the logs, I notice the following error:

An unexpected error has occurred while updating the GeoFences from server "Default" in service "WPHex". java.io.IOException: Error accessing data store at https://server.blah.com:6443/arcgis/. : 400 : Unable to complete operation.

This error message is telling us that GeoEvent failed to get the GoeFence features from the web service you selected.  If you select the ObjectID for either the Category or Name Field the request will work.  However, if you do not select ObjectID for either of these fields the web service may fail.

The Cause: Setting Max Record Count on Feature/Map Service

The reason the import above is failing is an issue in the web service (BUG-000126618): When we set the MaxRecordCount property to something other than 1000 any request for more than 1000 features will fail when the ObjectID is not included in the request.  That is a very long sentance, so lets break that down:

- A feature or map service is published with more than 1000 features in it.

- The web service is published with a MaxRecordCount > 1000 (in this case 2000)

- The GeoEvent request for features includes the Name field, but not the ObjectID field (Category Field = "HEX" and Name Field = Name)

- The web service fails to return any features, thus GeoEvent has no GeoFences to import.

Workarounds

Workaround 1: Set Max Record Count = 1000

The first workaround is to set the MaxRecordCount property on the Map/Feature Service to 1000. For whatever reason, the web service works perfectly fine so long as this property is set to 1000. Once you set it to anything larger than 1000, the service fails to return features.

Workaround 2: Use ObjectID as Name Field

The second workaround is to use the ObjectID as the name field in GeoEvent GeoFence Import/Synchronization.  Using ObjectID, it doesn't matter what the setting is on the service for MaxRecordCount.

1 Comment
About the Author
Esri Professional Services Real-Time GIS Team GeoEvent Sr. Product Enginner