How to get a detailed error message when offline sync fails?

5097
10
11-12-2014 12:58 AM
JuhoVainio
Occasional Contributor

After I've created an offline replica I try to sync the changes back to the server. I get an exception message saying "An exception occured: Error code '500' : 'Failed to synchronize.'" but I don't get any more information. I've googled for the error message and if I would do this from the ArcGIS Server's REST interface (web browser), I'd get more details.

Is this a limitation on the ArcGIS Runtime Desktop API for Microsoft .Net? Is there any way to get any more information on the exception? Maybe this could be implemented in the future release (inner exception maybe?).

The code worked yesterday but now someone has done something on the server and I'd like to know what's wrong...

0 Kudos
10 Replies
AnttiKajanus1
Occasional Contributor III

Can you see what JSON is returned from the server and if that includes the error? If it returned, then we can most likely do something about reporting it back to the user.

0 Kudos
JuhoVainio
Occasional Contributor

I don't think I have the access to the JSON message. The only information available is the Exception variable in the SyncCompleteCallback method. Also the GeodatabaseStatusInfo variable is null, so there's nothing there either.

0 Kudos
AnttiKajanus1
Occasional Contributor III

So you cannot use Fiddler or other tools to check it? I would be interested what traffic is going on after you start sync. That would be easiest way to see what's going on and in what point the error is thrown.

Does this error occur after progress is called couple times or does it come back to that right away?

0 Kudos
JuhoVainio
Occasional Contributor

The JSON response is simply:

{

"resultUrl":"",

"replicaName":"Ags_Fs_1415789855240",

"submissionTime":1418295480000,

"lastUpdatedTime":1418295489000,

"status":"Failed",

"error":

  {"code":500,"description":"Failed to synchronize."}

}

So it's not very helpful

I just got more information that someone had changed service's the target database from Oracle XE database to Oracle 11g Enterprise. The Sync capability is not enabled on the new database, so there's the reason. However, the error message should be more descriptive ("failed to syncronize: sync capability not enabled")!

0 Kudos
AnttiKajanus1
Occasional Contributor III

I agree that it's not very good error message that is returned from the server. Unfortunately that's all we know what happened in the operation on the .NET side. I will log this as an issue to the Server / REST side so in the future we would get a bit more details what's going on.

JuhoVainio
Occasional Contributor

We're having this issue again. Now the sync capabilities are enabled but the sync still fails. Is there any way to know what's wrong? The server returns a few status messages (InProgress), but then fails. The code works with an Oracle XE server, but I don't see any differences in the table structure or service definition.

Also: I haven't changed any data on the offline database. I just wanted to test if the sync works at all.

Service's sync capabilities are:

Supports Registering Existing Data: true

Supports Sync Direction Control: true

Supports PerLayer Sync: true

Supports PerReplica Sync: false

Supports RollbackOnFailure : false

Supports Async: true

I also checked the ArcGIS Server Manger logs and found this entry:

Failed in acquiring Archive Difference Cursor for Dataset: SCHEMA.TableName for Replica: SCHEMA.Ags_Fs_1421226240935 [GUID: A9BFF549-4F11-4707-A5C2-A6CE82826D2E]. Time taken: 0.032000 seconds. Underlying DBMS error [SCHEMA.TableName]

I've checked that we have the correct SDE version and archiving is enabled. Do you know anything else that we can do, antti kajanus‌?

0 Kudos
AnttiKajanus1
Occasional Contributor III

Heya Juha,

Let me ask around what could be done. Just to clarify this occurs with Oracle 11g Enterprise and works with same data/structure in XE?

0 Kudos
JuhoVainio
Occasional Contributor

The structure is the same, but the data varies (test/prod environment).

0 Kudos
JuhoVainio
Occasional Contributor

Any information about this issue yet?

0 Kudos