locked
CTP2 RelationalSyncProvider object reference not set to instance of object exception RRS feed

  • Question

  • I have modified WebSharingAppDemo to use sqlexpress as client in hub-n-spoke scenario. I am using sqlent server.The process exports the schema from server to client but at synchronize call following exception is thrown


    at Microsoft.Synchronization.Data.RelationalSyncProvider.ResetProviderState(DbSyncScopeMetadata scopeMetadata, DataSet dataSet, DbSyncSession DbSyncSession)
       at Microsoft.Synchronization.Data.RelationalSyncProvider.GetChanges(DbSyncScopeMetadata scopeMetadata, DbSyncSession DbSyncSession, UInt32 memoryBatchSize)
       at Microsoft.Synchronization.Data.RelationalSyncProvider.GetChangeBatch(UInt32 batchSize, SyncKnowledge destinationKnowledge, Object& changeDataRetriever)
       at Microsoft.Synchronization.KnowledgeProviderProxy.GetChangeBatch(UInt32 dwBatchSize, ISyncKnowledge pSyncKnowledge, ISyncChangeBatch& ppChangeBatch, Object& ppUnkDataRetriever)


    I am using SqlSyncProvider for client. I have verified that the I am supplying all the necessary properties to the RelationalSyncProvider - which is being provided to the SyncOrchestrator. Is there anything I am missing ?

    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:47 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, October 14, 2009 1:19 PM

Answers

All replies

  • Hi,

    There is no exception message and it is impossible to tell what was missing. Please enable tracing: http://msdn.microsoft.com/en-us/library/cc807160(SQL.105).aspx and rerun your app. You will see more details in the trace file.

    Also, please try the same sample with Sync Framework v2.0 RTM. You can find it at: http://code.msdn.microsoft.com/sync

    Thanks,
    Dong
    This posting is provided AS IS with no warranties, and confers no rights.
    Tuesday, October 27, 2009 6:10 PM
    Moderator
  • Hi Dong,

    Thanks for your reply !

    The above exception is extracted from syncSesionContext object which is a parameter to the EndSession (SyncSessionContext syncSesionContext) method in RelationalProviderProxy class in WebSharingAppDemo.

    Excepetion Message - Object reference not set to an instance of an object.

    However in the outer most catch I am getting the following exception

    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 SyncEngine.InitSync() in C:\Documents and Settings\Desktop\CTP 2\App_08092009\core_new\SyncEngine.cs:line 231


    I have supplied all the necessary parameters for local as well as remote provider and SyncOrchestrator class also.
    Am I missing something?

    Friday, October 30, 2009 7:21 AM