Sync Issues - 10.1

599
2
07-03-2013 07:51 AM
KierenTinning1
New Contributor II
All,

I am migrating from Mobile 10 to Mobile 10.1.1 (which sucks from an upgrade procedure) The server has gone from 10 to 10.1 as well. I had custom sync code which worked just fine and when I migrate it over the system never syncs (it returns 'Ready') and appears to work but the data never leaves the cache and never arrives on the server. Any idea on what is wrong with this code (which worked just fine in 10)

IEnumerable<FeatureSourceInfo> efsi = MobileApplication.Current.Project.EnumerateFeatureSourceInfos();
foreach (FeatureSourceInfo fsi in efsi)
FeatureSource fs = fsi.FeatureSource;
con.Url = fsi.MobileCacheMapLayerInfo.MobileServiceConnection.Url;

                    try
                    {
                       
                        var fSyncAgent = new FeatureSyncAgent(fs, con);
                        fSyncAgent.SynchronizationDirection = SyncDirection.UploadOnly;
                        fSyncAgent.Synchronize();
                        SyncResults sr = fSyncAgent.Synchronize();
                        if (sr.Exception != null)
                            fSyncAgent.Synchronize();

                    }
                    finally
                    {
                        fSyncAgent = null;
                    }
}

Any help would be appreciated. My server shows a momentary connection where one of the services shows "in use" briefly, so I assume it is connecting.

BTW, the download code no longer works either.

As mentioned the upgrade from 10 to 10.1 is certainly not as simple as it would initially appear.

Thanks
2 Replies
KierenTinning1
New Contributor II
So, to continue on,

If I use a MobileCacheSyncAgent it downloads the data just fine, so it would appear the service is working, but I am only interested in uploading my data from the field (and you cannot set a direction on the MobileCacheSyncAgent)

So, going from there if I get the individual FeatureSyncAgent from the MobileCacheSyncAgent the preumption would be that it would work, however it still does not.

Any ideas would be most appreciated

Thanks
0 Kudos
KierenTinning1
New Contributor II
Learn something new every day.

Turns out that the selection tables (the ones that ArcMap writes to when selecting over 100 features) had not been set up in the Oracle environment.

When Mobile posts, ArcGIS Server uses these tables to reconcile and post the data (even just 1 feature). Problem being it does not report the error in an easily findable way.

Solution was to select greater than 100 features in an ArcMap session which caused SDE to create these tables and voila, the sync problem went away
0 Kudos