0

I use SIF to install XP1 packages for all Sitecore 9.0.2 server roles. When I look in the logs of the Reporting instance, I see exceptions, such as:

Dependency injection can't find an implementation of IReferenceDataClient

11420 16:41:21 ERROR Application error.
Exception: System.InvalidOperationException
Message: Unable to resolve service for type 'Sitecore.Xdb.ReferenceData.Core.IReferenceDataClient' while attempting to activate 'Sitecore.Marketing.Operations.Xdb.ReferenceData.Service.Definitions.Profiles.ProfileDefinitionReferenceDataRepository'.
Source: Microsoft.Extensions.DependencyInjection
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.PopulateCallSites(ServiceProvider provider, ISet`1 callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.CreateCallSite(ServiceProvider provider, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetResolveCallSite(IService service, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetServiceCallSite(Type serviceType, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.PopulateCallSites(ServiceProvider provider, ISet`1 callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.CreateCallSite(ServiceProvider provider, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetResolveCallSite(IService service, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetServiceCallSite(Type serviceType, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType, ServiceProvider serviceProvider)
   bei System.Collections.Concurrent.ConcurrentDictionaryExtensions.GetOrAdd[TKey,TValue,TArg](ConcurrentDictionary`2 dictionary, TKey key, Func`3 valueFactory, TArg arg)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   bei Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   bei Sitecore.Marketing.Definitions.DefinitionManagerFactory.GetDefinitionManager[TDefinition]()
   bei Sitecore.Analytics.Data.MarketingDefinitions.<>c__DisplayClass7_0.<.ctor>b__4()
   bei System.Lazy`1.CreateValue()
   bei System.Lazy`1.LazyInitValue()
   bei Sitecore.Analytics.Data.MarketingDefinitions.InitializeProfilesWithDefaultValues()
   bei System.Lazy`1.CreateValue()
   bei System.Lazy`1.LazyInitValue()
   bei Sitecore.Analytics.Data.TrackingField.InitializeProfiles()
   bei Sitecore.Analytics.Data.TrackingField..ctor(Field innerField)
   bei Sitecore.Analytics.Data.TrackingField.GetTrackingField(Item item)
   bei Sitecore.Analytics.Data.TrackingField.FindTrackingField(Item item)
   bei Sitecore.Analytics.Data.TrackingField.HasTracking(Item item)
   bei Sitecore.Analytics.Media.MediaRequestTrackingInformation.IsTrackedRequest()
   bei Sitecore.Analytics.RobotDetection.Media.MediaRequestSessionModule.IsSessionRequired()
   bei Sitecore.Analytics.Media.MediaRequestSessionModule.ContextPostMapRequestHandler(Object sender, EventArgs e)
   bei System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   bei System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   bei System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Dependency injection can't find an implementation of IReferenceDataProvider

29048 16:56:33 ERROR Application error.
Exception: System.InvalidOperationException
Message: Unable to resolve service for type 'Sitecore.Xdb.ReferenceData.Core.Repository.IReferenceDataProvider' while attempting to activate 'Sitecore.Xdb.ReferenceData.Service.Repository.ReferenceDataRepository'.
Source: Microsoft.Extensions.DependencyInjection
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.PopulateCallSites(ServiceProvider provider, ISet`1 callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.CreateCallSite(ServiceProvider provider, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetResolveCallSite(IService service, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetServiceCallSite(Type serviceType, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.PopulateCallSites(ServiceProvider provider, ISet`1 callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.CreateCallSite(ServiceProvider provider, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetResolveCallSite(IService service, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetServiceCallSite(Type serviceType, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.PopulateCallSites(ServiceProvider provider, ISet`1 callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.CreateCallSite(ServiceProvider provider, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetResolveCallSite(IService service, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetServiceCallSite(Type serviceType, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.PopulateCallSites(ServiceProvider provider, ISet`1 callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.CreateCallSite(ServiceProvider provider, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetResolveCallSite(IService service, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetServiceCallSite(Type serviceType, ISet`1 callSiteChain)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType, ServiceProvider serviceProvider)
   bei System.Collections.Concurrent.ConcurrentDictionaryExtensions.GetOrAdd[TKey,TValue,TArg](ConcurrentDictionary`2 dictionary, TKey key, Func`3 valueFactory, TArg arg)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   bei Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   bei Sitecore.Marketing.Definitions.DefinitionManagerFactory.GetDefinitionManager[TDefinition]()
   bei Sitecore.Analytics.Data.MarketingDefinitions.<>c__DisplayClass7_0.<.ctor>b__4()
   bei System.Lazy`1.CreateValue()
   bei System.Lazy`1.LazyInitValue()
   bei Sitecore.Analytics.Data.MarketingDefinitions.InitializeProfilesWithDefaultValues()
   bei System.Lazy`1.CreateValue()
   bei System.Lazy`1.LazyInitValue()
   bei Sitecore.Analytics.Data.TrackingField.InitializeProfiles()
   bei Sitecore.Analytics.Data.TrackingField..ctor(Field innerField)
   bei Sitecore.Analytics.Data.TrackingField.GetTrackingField(Item item)
   bei Sitecore.Analytics.Data.TrackingField.FindTrackingField(Item item)
   bei Sitecore.Analytics.Data.TrackingField.HasTracking(Item item)
   bei Sitecore.Analytics.Media.MediaRequestTrackingInformation.IsTrackedRequest()
   bei Sitecore.Analytics.RobotDetection.Media.MediaRequestSessionModule.IsSessionRequired()
   bei Sitecore.Analytics.Media.MediaRequestSessionModule.ContextPostMapRequestHandler(Object sender, EventArgs e)
   bei System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   bei System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   bei System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Dependency injection can't find the connection string xdb.referencedata

14920 17:00:59 ERROR Application error.
Exception: System.Reflection.TargetInvocationException
Message: Ein Aufrufziel hat einen Ausnahmefehler verursacht.
Source: mscorlib
   bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   bei System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   bei Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters)
   bei Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)
   bei Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
   bei Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
   bei Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
   bei Sitecore.Xdb.ReferenceData.SqlServer.Xmgmt.Configuration.ServiceCollectionExtensions.<>c.<AddSqlServerReferenceDataProvider>b__0_0(IServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider)
   bei Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   bei Sitecore.Marketing.Definitions.DefinitionManagerFactory.GetDefinitionManager[TDefinition]()
   bei Sitecore.Analytics.Data.MarketingDefinitions.<>c__DisplayClass7_0.<.ctor>b__4()
   bei System.Lazy`1.CreateValue()
   bei System.Lazy`1.LazyInitValue()
   bei Sitecore.Analytics.Data.MarketingDefinitions.InitializeProfilesWithDefaultValues()
   bei System.Lazy`1.CreateValue()
   bei System.Lazy`1.LazyInitValue()
   bei Sitecore.Analytics.Data.TrackingField.InitializeProfiles()
   bei Sitecore.Analytics.Data.TrackingField..ctor(Field innerField)
   bei Sitecore.Analytics.Data.TrackingField.GetTrackingField(Item item)
   bei Sitecore.Analytics.Data.TrackingField.FindTrackingField(Item item)
   bei Sitecore.Analytics.Data.TrackingField.HasTracking(Item item)
   bei Sitecore.Analytics.Media.MediaRequestTrackingInformation.IsTrackedRequest()
   bei Sitecore.Analytics.RobotDetection.Media.MediaRequestSessionModule.IsSessionRequired()
   bei Sitecore.Analytics.Media.MediaRequestSessionModule.ContextPostMapRequestHandler(Object sender, EventArgs e)
   bei System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   bei System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   bei System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.ArgumentException
Message: Unable to find connection string with name 'xdb.referencedata'
Source: Sitecore.Xdb.ReferenceData.SqlServer
   bei Sitecore.Xdb.ReferenceData.SqlServer.SqlServerReferenceDataProvider.ResolveConnectionString(String connectionStringOrName)
   bei Sitecore.Xdb.ReferenceData.SqlServer.SqlServerReferenceDataProvider..ctor(String connectionStringOrName, ILogger`1 logger, ITvpConverter tvpConverter, IRetryManager retryManager)
   bei Sitecore.Xdb.ReferenceData.SqlServer.SqlServerReferenceDataProvider..ctor(String connectionStringOrName, ILogger`1 logger, IRetryManager retryManager)

How do I configure Sitecore Reporting correctly to prevent these errors from occurring?

1 Answer 1

1

It looks like the Reporting role is configured incorrectly out of the box. It does not have the Reference Data subsystem enabled. Here's how you can fix this.

Step 1

  1. Open the file Sitecore.Xdb.ReferenceData.Service.config located under \App_Config\Sitecore\Marketing.Xdb.ReferenceData.Service\
  2. Update <sitecore role:require="Processing or Standalone">
    to <sitecore role:require="Processing or Standalone or Reporting">

Step 2:

  1. Open the file Sitecore.Xdb.ReferenceData.SqlServer.config located under \App_Config\Sitecore\Marketing.Xdb.ReferenceData.SqlServer\
  2. Update <sitecore role:require="Processing or Standalone">
    to <sitecore role:require="Processing or Standalone or Reporting">

Step 3:

  1. Open the file \App_Config\ConnectionStrings.config
  2. Add a new connection string named xdb.referencedata and point it to the relevant SQL database. You can look up the value of this connection string on your CM instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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