locked
SyncOrchestrator execute Synchronize() method raise exception RRS feed

  • Question

  • orchestrator.SessionProgress += new EventHandler<SyncStagedProgressEventArgs>(orchestrator_SessionProgress);
     //execute  data sync
     SyncOperationStatistics stats = orchestrator.Synchronize();
    ====================  Exception ======================
    System.InvalidCastException was unhandled
      Message="Unable to cast COM object of type 'System.__ComObject' to interface type 'ISyncKnowledge2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{ED0ADDC0-3B4B-46A1-9A45-45661D2114C8}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."
      Source="Microsoft.Synchronization"
      StackTrace:
        Server stack trace: 
           at System.ServiceModel.Channels.CommunicationObject.ThrowPending()
           at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
           at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
           at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
           at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
           at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
        Exception rethrown at [0]: 
           at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
           at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
           at Ruihua.Standard.DataSync.DataCenter.IRelationalSyncContract.EndSession()
           at Ruihua.Standard.DataSync.ClientServer.RelationalProviderProxy.EndSession(SyncSessionContext syncSessionContext) in D:\Test Projects\Sync Framework\Proxy\Ruihua.Standard.DataSync.ClientServer\Proxy\RelationalProviderProxy.cs:line 149
           at Microsoft.Synchronization.KnowledgeProviderProxy.EndSession(ISyncSessionState pSessionState)
           at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)
           at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32& changesApplied, Int32& changesFailed)
           at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed)
           at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()
           at Microsoft.Synchronization.SyncOrchestrator.Synchronize()
           at Ruihua.Standard.DataSync.ClientServer.SynchronizationHelper.SynchronizeProviders(KnowledgeSyncProvider localProvider, KnowledgeSyncProvider remoteProvider) in D:\Test Projects\Sync Framework\Proxy\Ruihua.Standard.DataSync.ClientServer\SynchronizationHelper.cs:line 59
           at Ruihua.Standard.DataSync.ClientServer.ClientProvider..ctor() in D:\Test Projects\Sync Framework\Proxy\Ruihua.Standard.DataSync.ClientServer\ClientProvider.cs:line 81
           at Ruihua.Standard.DataSync.ClientServer.Form1..ctor() in D:\Test Projects\Sync Framework\Proxy\Ruihua.Standard.DataSync.ClientServer\Form1.cs:line 19
           at Ruihua.Standard.DataSync.ClientServer.Program.Main() in D:\Test Projects\Sync Framework\Proxy\Ruihua.Standard.DataSync.ClientServer\Program.cs:line 18
      InnerException: null
    ==============================================================
    anyone else give me the answer?
    Wednesday, August 17, 2011 1:01 AM

All replies

  • a couple of things to check:

    do you have Sync Framework installed on your server?

    does the platform of your Sync Framework installation match match the application platform? (i.e., 64bit Sync Fx for 64bit application, etc...)

    Wednesday, August 17, 2011 2:24 AM
  • 3ks,JuneT

    I had installed the Sync Framework(DatabaseProviders-v3.1-x86-CHS.msi,ProviderServices-v2.1-x86-CHS.msi,Synchronization-v2.1-x86-CHS.msi) on the internet server.

    I fixed the exception.

    fixed by set the local sqlsyncprovider and remote sqlsyncprovider MemoryDataCacheSize=1,BatchSpoolLocation=batch spool location Directory.

    =====================================================================

    i guess the exception will raise by sync the data size that is too big. 

    Wednesday, August 17, 2011 5:23 AM
  • you should get an out of memory exception if its related to memory and not COM error.

     

    Wednesday, August 17, 2011 6:15 AM
  • this exception will raise by network instability,and the remote provider has been raised any exception .too bad...
    Wednesday, August 17, 2011 9:41 AM