Select to view content in your preferred language

Offline Data editing on Versioned Data

4118
3
03-22-2016 05:37 AM
ozcandurak
Deactivated User

I have registered my layer as "Registered as  versioned" with the "Register the selected objects with the option to move edits to base".

I can publish the the data the feature server with "Sync" features on.

Data can be used online, but when trying to "download the map" for "offline" use.

The application logs says :

Error Domain=NSCocoaErrorDomain Code=400 "Failed to create replica." UserInfo={NSURL=http://52.28.226.146/arcgis/rest/services/yyy/yyyy/FeatureServer/jobs/j57ac7b5825c446e0a9e29de2faee7..., responseJSON={

    error =     {

        code = 400;

        description = "Failed to create replica.";

    };

    lastUpdatedTime = 1458648838000;

    replicaName = "";

    resultUrl = "";

    status = Failed;

    submissionTime = 1458648835000;

}, NSLocalizedFailureReason=Failed to create replica.}

And when checked "Arcgis server Manager" logs 2 error occurs :

Error 1

Error executing tool.: ErrorMsg@SyncGPService:{"code":400,"description":"Failed to create replica."} Failed to execute (Create Feature Service Replica).

Error 2

Error: An error occurred while adding an entry to the FEATUREDATASET_CLASSES or the FEATURECLASSES table. [Read only data or unversioned data cannot be replicated. Data versioned with the option to move edits to base cannot be replicated. GlobalIDs are required for two way and one way replica data. Creating one way replica using archiving requires archiving the replicated parent data.].


The achivement goal is :

Publish a feature server to use on mobile for online/offline editing with versioned data and all changes and updates shown on service immediately.

What i have already tried :

  • Read the prepare offline map and feature documentation and made sure that i had Global ID
  • When i do not use "Register the selected objects with the option to move edits to base" for data versioning option. Data is not displaying on the server when sync in offline mods.

Why we need versioning :

To be able to change and edit on Arcmap and webservices for multiple users.

Thanks in advance.

0 Kudos
3 Replies
PaulDavidson1
Frequent Contributor

I have not done this but I do see that your AGS error 2 says:

Data versioned with the option to move edits to base cannot be replicated.

What happens when you turn off that flag?

I assume you've checked your permissions in the database to verify the user taking the data off line has edit permissions?

BTW - I'm working on scripting edits of versioned data and it's not trivial.

Not the same problem as yours but what I am learning is that there are a number of steps that have to be done in the right order.

There is a decent overview of editing versions, while it's just the PPT slides and it's not related to offline data, maybe something in here will spark a clue for you:

https://community.esri.com/docs/DOC-1837?q=editting ver

YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Ozcan,

For the issue that not able to create replica, my recommendation is first using this proxy application tool called “Charles” to capture the create replica request that triggered from Xcode simulator to server, and then you can save that request parameters in a file and copy&paste those parameters directly on REST (http://52.28.226.146/arcgis/rest/services/yyy/FeatureServer/createReplica) to see if you can still get 400 error.

charlesReturnAttachment.png

Then you can narrow down the issue if it is related to Server or SDK. Most likely, this is still reproduced on REST. Then you probably need to review this online documentation about how to prepare a versioned data for offline map: Offline maps and versioned data—Documentation (10.3 and 10.3.1) | ArcGIS for Server

Hope this can help

ShiminCai
Frequent Contributor

Hi,

Based on the error infos, it looks to me that creating offline replica from versioned data works like sde database replication that requires data being registered as versioned without the option to move edits to base table. I think, in order to create a replica from versioned data, you would have to register your data as versioned without ticking that option box. However, to achieve your goal of showing data edits immediately after sync, would you consider setting up desktop processes of reconcile and post to run in a timely manner to move edits from delta to base and refresh the services?

Just a thought.

Shimin

0 Kudos