Ramakrishna Kudikala
Ramakrishna Kudikala

Reputation: 65

Sitecore Analytics Error - Item buckets

We are seeing an issue in the Sitecore log files, the message says - "Cannot use Analytics with a database that has no definition items". We have not enabled Analytics in our Sitecore environment. Is anyone aware of this error ?

Here is the stack trace that I found from Sitecore log file

2764 2015:02:24 14:11:17 ERROR Application error.
Exception: System.InvalidOperationException
Message: Cannot use Analytics with a database that has no definition items
Source: Sitecore.Kernel
   at Sitecore.Diagnostics.Assert.ResultNotNull[T](T result, String message)
   at Sitecore.Analytics.Commons.LazyReference`1.GetValue(Object mutex, Func`1 initializer)
   at Sitecore.Analytics.Data.Items.AnalyticsItems.<get_Profiles>b__7()
   at Sitecore.Analytics.Commons.LazyReference`1.GetValue(Object mutex, Func`1 initializer)
   at Sitecore.Analytics.Data.TrackingField.NormalizeProfiles(AnalyticsItems analytics)
   at Sitecore.Analytics.Data.TrackingField.InitializeProfiles()
   at Sitecore.Buckets.Pipelines.UI.DynamicFields.EngagementValue.IsLockedCheck(DynamicFieldsArgs args)
   at Sitecore.Buckets.Pipelines.UI.DynamicFields.EngagementValue.Process(DynamicFieldsArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Buckets.Pipelines.UI.DynamicFields.DynamicFieldsPipeline.Run(DynamicFieldsArgs args)
   at Sitecore.Buckets.Pipelines.UI.FillItem.SetItemProperties.GetValue(Item innerItem, SitecoreUISearchResultItem sitecoreItem)
   at Sitecore.Buckets.Pipelines.UI.FillItem.SetItemProperties.GetQuickActions(FillItemArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Buckets.Pipelines.UI.FillItem.FillItemPipeline.Run(FillItemArgs args)
   at ItemBuckets.Services.Search.<ProcessRequestAsync>d__d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Let me know if additional information is needed.

Upvotes: 0

Views: 589

Answers (1)

Martin Davies
Martin Davies

Reputation: 4456

The stack trace shows the following method is being called: Sitecore.Buckets.Pipelines.UI.DynamicFields.EngagementValue.IsLockedCheck

In that method, a TrackingField object is instantiated which in turn calls it's own method InitializeProfiles (This also appears in the stack trace).

The thing is, that TrackingField object is only created if the value of the static Settings.Analytics.Enabled property is true, and there are 2 elements required for this:

  • The Analytics.Enabledsetting in the Sitecore.Analytics.config file must be set to true.
  • The Sitecore licence must include DMS.

Are you sure you don't have analytics enabled, because it seems Sitecore thinks you do.

Upvotes: 1

Related Questions