On a 9.0.2 Sitecore instance with one CM and one CD, where XConnect site is defined to run on the same server as the CM server, I noticed that data is not being collected into xdb when navigating the public site served by the CD node. On a local development it is collecting data though. Investigating logs I found the following after browsing a few pages in the CD site:

1144 12:55:29 ERROR PostSessionEndPipeline failed.
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.Analytics.XConnect
   at Sitecore.Analytics.XConnect.DataAccess.Pipelines.ConvertToXConnectEventPipeline.ConvertPageEventDataToEventBase.FillEvent(Event xconnectEvent, PageEventData pageEventData)
   at Sitecore.Analytics.XConnect.DataAccess.Pipelines.ConvertToXConnectEventPipeline.ConvertToXConnectEventProcessorBase`1.Process(ConvertToXConnectEventPipelineArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Analytics.XConnect.DataAccess.PipelineBasedModelConverter.<>c__DisplayClass5_0.<ConvertToXConnectEvent>b__0()
   at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.Monitor[T](OperationPerformanceMonitorBase monitor, Func`1 operation)
   at Sitecore.Analytics.XConnect.DataAccess.XdbModelExtensions.<ToEvents>d__3.MoveNext()
   at Sitecore.Analytics.XConnect.DataAccess.XdbModelExtensions.ToInteraction(VisitData visitData, IEntityReference`1 contact, ModelConverterBase converter)
   at Sitecore.Analytics.XConnect.DataAccess.Pipelines.ConvertToXConnectInteractionPipeline.ConvertToXConnectInteractionProcessor.Process(ConvertToXConnectInteractionPipelineArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Analytics.XConnect.DataAccess.PipelineBasedModelConverter.<>c__DisplayClass6_0.<ConvertToXConnectInteraction>b__0()
   at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.Monitor[T](OperationPerformanceMonitorBase monitor, Func`1 operation)
   at Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider.<>c__DisplayClass19_0.<SaveVisit>b__1(IXdbContext xdbContext)
   at Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider.<>c__DisplayClass31_0.<ExecuteWithExceptionHandling>b__0(IXdbContext c)
   at Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider.ExecuteWithExceptionHandling[T](Func`2 func)
   at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.<>c__DisplayClass1_0.<Monitor>b__0()
   at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.Monitor[T](OperationPerformanceMonitorBase monitor, Func`1 operation)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Analytics.Data.HttpSessionContextManager.Submit(Session session)
   at Sitecore.Analytics.Pipelines.CommitSession.SubmitSession.Process(CommitSessionPipelineArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.<>c__DisplayClass1_0.<Monitor>b__0()
   at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.Monitor[T](OperationPerformanceMonitorBase monitor, Func`1 operation)
   at Sitecore.Analytics.Pipelines.PostSessionEnd.CommitSession.Process(PostSessionEndArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Pipelines.EndSession.PostSessionEndPipeline.Run(PostSessionEndArgs args)
   at Sitecore.Web.Application.RaiseSessionEndEvent(HttpApplication context)

Any thoughts on what could be causing this issue?

  • This is on Sitecore 9 so no mongo – Diego Nov 8 at 13:55
  • do you know which page events are supposed to be saved for the page? – grg Nov 8 at 14:01
  • Since we are not tracking any specific events I believe only visits – Diego Nov 8 at 14:01
  • It seems that an XConnect counterpart of some page event type cannot be created. It might be one of the system events, but it's impossible to tell, because even type is not logged. You could try to debug the ConvertToXConnectEventPipeline pipeline and inspect the type of the argument passed into ConvertToXConnectEventProcessorBase.ConvertToEvent() method. – grg Nov 8 at 14:25
  • 1
    Have you deployed all marketing defns successfully? – Mark Gibbons Nov 8 at 22:19
up vote 1 down vote accepted

All marketing definitions need to be deployed succesfully for the xDB to function properly.

Sitecore 9.0 xDB documentation:

Definitions are deployed to the reference data store. If a definition has not been deployed, it cannot be used in an xDB context such as processing.

To deploy as per (old 8.2) documentation:

  1. Log in to the Sitecore Experience Platform desktop.
  2. Click Control Panel and navigate to the ANALYTICS section.
  3. Click Deploy marketing definitions.
  4. In the Deploy marketing definitions dialog box, select all the check boxes and click Deploy.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.