1

I'm working in a recently upgraded 8.2 instance. I'm trying to add personalization to a component, but when I click on the Personalize button it throws the following error:

ExecuteReader: CommandText property has not been initialized

Stack Trace:

[InvalidOperationException: ExecuteReader: CommandText property has not been initialized]
   System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) +829
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +155
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +83
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +199
   Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteReader() +121

[DataException: Error executing SQL command: ]

[Exception: ExecuteReader: CommandText property has not been initialized]
   Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteReader() +304
   Sitecore.Data.DataProviders.Sql.DataProviderReader..ctor(DataProviderCommand command) +58
   Sitecore.Data.DataProviders.Sql.c__DisplayClass12.b__10() +72
   Sitecore.Data.DataProviders.NullRetryer.Execute(Func`1 action, Action recover) +290
   Sitecore.Data.DataProviders.Sql.SqlDataApi.CreateReader(String sql, Object[] parameters) +281
   Sitecore.Analytics.Reporting.SqlReportDataSource.GetData(ReportDataQuery query) +686
   Sitecore.Analytics.Reporting.ReportDataProvider.ExecuteQueryWithCache(ReportDataQuery query, ReportDataSource dataSource, CachingPolicy cachingPolicy) +335
   Sitecore.Analytics.Reporting.ReportDataProvider.GetData(String dataSourceName, ReportDataQuery query, CachingPolicy cachingPolicy) +317
   Sitecore.Analytics.Reporting.Datasources.ItemReportDataSource.GetData(ReportDataQuery query) +406
   Sitecore.Analytics.Reporting.c__DisplayClass6.b__4() +28
   Sitecore.Analytics.Reporting.ReportDataProvider.GetCachedDataForQuery(ReportDataQuery query, Func`1 ifNotAvailableInCache, Nullable`1 ifModifiedSince) +511
   Sitecore.Analytics.Reporting.ReportDataProvider.ExecuteQueryWithCache(ReportDataQuery query, ReportDataSource dataSource, CachingPolicy cachingPolicy) +728
   Sitecore.Analytics.Reporting.ReportDataProvider.GetData(String dataSourceName, ReportDataQuery query, CachingPolicy cachingPolicy) +317
   Sitecore.Analytics.Reporting.ReportingQueryBase.ExecuteQuery(Dictionary`2 parameters) +98
   Sitecore.ContentTesting.Analytics.Reporting.LastTestForPersonalizationRuleQuery.Execute() +187
   Sitecore.ContentTesting.Data.SitecorePersonalizationTestStore.GetLastTestForPersonalizationRule(Guid ruleSetId, Guid ruleId) +172
   Sitecore.ContentTesting.Services.PersonalizationService.GetPersonalizationPerformance(ItemUri itemUri, ID deviceId, Guid ruleSetId, Guid ruleId, Boolean ignoreTests, Boolean& setData) +262
   Sitecore.ContentTesting.Services.PersonalizationService.GetRulePerformanceData(ItemUri itemUri, ID deviceId, Guid ruleSetId, Guid ruleId, Boolean ignoreTests) +341
   Sitecore.ContentTesting.Pipelines.RenderRulePlaceholder.AfterAction.Reach.CalculateValue(ItemUri hostItemUri, ID deviceId, ID ruleSetId, ID ruleId) +117
   Sitecore.ContentTesting.Pipelines.RenderRulePlaceholder.AfterAction.Reach.Process(RenderRulePlaceholderArgs args) +228
   (Object , Object[] ) +71
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +469
   Sitecore.Pipelines.RenderRulePlaceholder.RenderRulePlaceholderPipeline.Run(String placeholderName, ItemUri uri, ID deviceId, ID ruleSetId, XElement rule) +261
   Sitecore.Shell.Applications.WebEdit.Dialogs.Personalization.PersonalizationForm.RenderRulePlaceholder(String placeholderName, XElement rule) +147
   Sitecore.Shell.Applications.WebEdit.Dialogs.Personalization.PersonalizationForm.GetRuleSectionHtml(XElement rule) +367
   Sitecore.Shell.Applications.WebEdit.Dialogs.Personalization.PersonalizationForm.RenderRules() +287

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +142
   Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +89
   Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) +597
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082
0

The error is about the Reporting database, things you can do:

1) Be sure you have an upgraded Reporting database. the upgrade path contain some database script that needs execute on the Reporting Database.

2) After upgrade it is recommended to Rebuilding the reporting database https://doc.sitecore.com/developers/82/sitecore-experience-platform/en/walkthrough--rebuilding-the-reporting-database.html can take a lot of time

3) Review the connection string of the Reporting database. are you using the correct DB

4) Take a look at the Log files, Are there more errors about the Reporting Database?

Your Answer

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

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