4

Processing server logs are full of the error

Aggregation Error
Exception: System.InvalidOperationException
Message: Object reference not set to an instance of an object.
Source: Sitecore.ExperienceAnalytics.Aggregation
   at Sitecore.ExperienceAnalytics.Aggregation.Pipeline.SegmentProcessor.ProcessSegments(AggregationPipelineArgs args, IEnumerable`1 segments)
   at Sitecore.ExperienceAnalytics.Aggregation.Pipeline.SegmentProcessor.OnProcess(AggregationPipelineArgs args)
   at Sitecore.Analytics.Aggregation.Pipeline.AggregationProcessor.Process(AggregationPipelineArgs args)

Nested Exception

Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.Commerce.ExperienceAnalytics
   at Sitecore.Commerce.ExperienceAnalytics.Models.CartLineModel.GetKey()
   at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.GroupedEnumerable`3.GetEnumerator()
   at Sitecore.Commerce.ExperienceAnalytics.Dimensions.ByCartManipulationsBase.<GetData>d__2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at Sitecore.ExperienceAnalytics.Aggregation.Pipeline.SegmentProcessor.ProcessSegments(AggregationPipelineArgs args, IEnumerable`1 segments)

I have registered the types in a pipeline processor that are patched after Sitecore.Analytics.Outcome.Pipelines.Initialize.RegisterDataModelExtensions

 patch:after="processor[@type='Sitecore.Analytics.Outcome.Pipelines.Initialize.RegisterDataModelExtensions, Sitecore.Analytics.Outcome']" />

and in my pipeline processor, I have the code to register the classes:

MongoDbObjectMapper.Instance.RegisterModelExtension<CartInfo>();
MongoDbObjectMapper.Instance.RegisterModelExtension<CartLineInfo>();

Is there anything else that I need to do?

  • are you getting these error only when you are applying the patch, or the errors are present without patch also?<br/><br/> There are errors related to Sitecore commerce as well, you might need to check the setup of application once again and see the basic setup is in place. – Ankit Joshi Nov 29 '17 at 12:45
  • Did you make sure that all the definitions have been deployed? Check if they are not in draft mode and they have been deployed – Hishaam Namooya Nov 29 '17 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.