POST
|
Hi, I've been encountering a recurring issue when trying to sync my non-spatial related tables. After following the requests through Fiddler, it looks like the sync process [AGSGDBSyncTask syncGeodatabase] is hanging on the REST -synchronizeReplica method and then fails. But as usual, there are no helpful error messages in the XCode debugger. Has anyone else ran into a problem similar to this? The error message I get is below: Error Domain=NSCocoaErrorDomain Code=500 "The operation couldn’t be completed. Failed to synchronize." UserInfo=0x1ab2b4d0 {NSURL=http://gisdemo1.cdmsmith.com/arcgis/rest/services/Mansfield_MA_FS/FeatureServer/jobs/j578830f81087440ca6a30d41eef60433?f=json, responseJSON={ error = { code = 500; description = "Failed to synchronize."; }; lastUpdatedTime = 1421440085000; replicaName = "Ags_Fs_1421439987693"; resultUrl = ""; status = Failed; submissionTime = 1421440081000; }, NSLocalizedFailureReason=Failed to synchronize.} Note: I can download / sync my spatial feature class with no problems. Thanks for any help, Colin
... View more
01-16-2015
12:36 PM
|
0
|
0
|
4102
|
POST
|
Hi, I'm receiving the following error code when trying to sync my non-spatial related table with the feature service. I can successfully sync my spatial feature layer with no issues. Error Domain=NSCocoaErrorDomain Code=500 "The operation couldn’t be completed. Failed to synchronize." UserInfo=0x1c4aa9e0 {NSURL=http://gisdemo1.cdmsmith.com/arcgis/rest/services/Mansfield_MA_FS/FeatureServer/jobs/jda6e1ee1fdb64fbebf203a8835b06d0b?f=json, responseJSON={ error = { code = 500; description = "Failed to synchronize."; }; lastUpdatedTime = 1420753586000; replicaName = "Ags_Fs_1420753396000"; resultUrl = ""; status = Failed; submissionTime = 1420753582000; }, NSLocalizedFailureReason=Failed to synchronize.} Has anyone encountered this error before? Any tips on how to retrieve a more specific error message or how to resolve? Thanks, Colin
... View more
01-08-2015
01:56 PM
|
0
|
1
|
4530
|
POST
|
Ahhh ok, I kept getting 0 results when using that method. I just figured out why. The problem was in my geodatabase initialization. In order to properly fetch non-spatial records, you have to set the queries property in the parameters of the initialization method (see below). AGSGDBGenerateParameters *params = [[AGSGDBGenerateParameters alloc]initWithFeatureServiceInfo:self.gdbTask.featureServiceInfo]; params.extent = self.mapView.maxEnvelope; params.outSpatialReference = self.mapView.spatialReference; NSMutableArray* layers = [[NSMutableArray alloc]init]; // Add Layer IDs [layers addObject:[NSNumber numberWithInt: 0]]; [layers addObject:[NSNumber numberWithInt: 1]]; params.layerIDs = layers; // Set AGSGDBLayerQuery for the non-spatial records AGSGDBLayerQuery *gdbQuery = [[AGSGDBLayerQuery alloc]init]; NSMutableArray *gdbQueries = [[NSMutableArray alloc]init]; gdbQuery.useGeometry = NO; gdbQuery.layerID = 1; gdbQuery.whereClause = @"1=1"; gdbQuery.option = AGSGDBQueryOptionAll; [gdbQueries addObject:gdbQuery]; params.queries = gdbQueries; self.newlyDownloaded = NO; [self.gdbTask generateGeodatabaseWithParameters:params downloadFolderPath:nil useExisting:NO status:^(AGSResumableTaskJobStatus status, NSDictionary *userInfo) { Thanks again Michael
... View more
01-02-2015
12:21 PM
|
1
|
0
|
507
|
POST
|
Thanks Michael. What method did you use to run the query against the table?
... View more
12-23-2014
12:12 PM
|
0
|
3
|
507
|
POST
|
Try including the file extension (.jpg, .mov) in your 'photoName' string. (i.e. MyPhoto.jpg)
... View more
12-23-2014
08:18 AM
|
0
|
0
|
163
|
POST
|
Hello, Per the Esri Preparing Data for Offline Use (Enabling Sync on ArcGIS Server Feature Services) documentation, it states: "Relationship Classes and Attachments MUST use GlobalID as the Primary Key" However, when attempting to use AGSRelationshipQuery to query the related table, the parameters only allow the use of ObjectIds (via the NSArray objectIds property). Can anyone provide clarification on this? Or an alternative method to querying related tables during offline use? Thanks, Colin
... View more
12-22-2014
07:21 AM
|
0
|
5
|
5114
|
POST
|
Hello, Is -queryRelatedFeaturesWithParameters() the only method that can be used when querying a non-spatial offline table? It seems that the AGSRelationshipQuery class assumes that we use the OBJECTID as the link between the feature table and related table, which my application does not. In my application, we allow the user to specify any field they want as the link. For example, 'HydrantID' could be the common linking field between our feature table and related table. As always, we have used the AGSQuery class for querying related records, using a custom 'where' clause. Unless I'm mistaken, this custom 'where' clause does not exist in the AGSRelationshipQuery object. This is the problem. Does anyone have a suggestion as to how to query an offline related table without using the OBJECTID as the link? Thanks, Colin
... View more
12-17-2014
07:33 AM
|
0
|
0
|
2741
|
POST
|
Suganya Baskaran, Is -queryRelatedFeaturesWithParameters() the only method that can be used when querying a non-spatial offline table? It seems that the AGSRelationshipQuery class assumes that we use the OBJECTID as the link between the feature table and related table, which my application does not. In my application, we allow the user to specify any field they want as the link. For example, 'HydrantID' could be the common linking field between our feature table and related table. As always, we have used the AGSQuery class for querying related records, using a custom 'where' clause. Unless I'm mistaken, this custom 'where' clause does not exist in the AGSRelationshipQuery object. This is the problem. Thanks, Colin
... View more
12-16-2014
12:06 PM
|
0
|
0
|
769
|
POST
|
Ahh ok, I missed this in the docs. Thanks! I'll try this workflow out.
... View more
12-03-2014
11:50 AM
|
0
|
0
|
427
|
POST
|
Hi, I'm trying to create an AGSFeatureTableLayer from a AGSFeatureServiceTable for online editing, and I'm receiving an 'Invalid JSON' error in the AGSLayerDeletgate -didFailToLoadWithError(). It's hard to tell what could be the problem. The layer I'm trying to build is a non-spatial table layer. Does anyone have insight as to what this error could mean? Thanks, Colin Note: I've successfully created an AGSFeatureTableLayer for the spatial feature service, with no problems.
... View more
12-03-2014
09:13 AM
|
0
|
2
|
4364
|
POST
|
Great, that gave me alot of clarity for the offline workflow of related tables. Thanks! Now for online.... I've created a AGSGDBFeatureServiceTable for my related table layer, the same way I created it for the feature service layer. The feature layer service loads fine, however the the related table layer is not loading the 'templates' property. Any idea why that could be? Do I create a separate object apart from the AGSGDBFeatuerServiceTable when initializing a Table layer? I've attached a screenshot of my code where the AGSGDBFeatureServiceTables are created:
... View more
12-02-2014
01:56 PM
|
0
|
3
|
769
|
POST
|
Hi, I've successfully implemented offline editing for a feature service in my app, but I'm having trouble replicating the offline functionality for a related table. Do I have to treat the related table as a completely separate service and replicate all of the sync objects ( AGSGDBSyncTask, AGSGDBGeodatabase, AGSGDBFeatureServiceTable, etc.) for this service as well? Any starting point or Esri example code would be be appreciated! Thanks, Colin
... View more
12-02-2014
10:14 AM
|
0
|
5
|
5323
|
POST
|
I am also having this problem - my feature layer is not refreshing after a Delete. Has anyone found a solution or workaround for this yet? This functionality worked fine prior to the 10.1.1 release.
... View more
12-06-2013
10:53 AM
|
0
|
0
|
213
|
POST
|
No, I've tried [self.activeFeatureLayer refresh] in didEditFeaturesWithResults upon successful update, and it still crashes. else if([editResults.updateResults count]>0){ //we were updating a feature AGSEditResult* result = (AGSEditResult*)[editResults.updateResults objectAtIndex:0]; if(result.success) { [self performSelectorOnMainThread:@selector(activeFeatureLayerRefresh) withObject:nil waitUntilDone:YES]; [self performSelectorOnMainThread:@selector(graphicLayerRefresh) withObject:nil waitUntilDone:YES]; I've also removed the graphicLayerRefresh to see if it was causing the crash, but it still crashes.
... View more
12-30-2012
05:53 PM
|
0
|
0
|
260
|
Title | Kudos | Posted |
---|---|---|
1 | 01-02-2015 12:21 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|