Skip to main content
2 of 2
edited tags
Rick Pannekoek
  • 21.4k
  • 1
  • 18
  • 30

DXA 1.5 website is not able to load throwing context service error

We have DXA 1.5 website and recently we have noticed that sometime the site goes down. Checking the logs shows the below error. I can see the context service error that says "An error occurred while resolving evidence using the Context Service". Can anyone suggest what could be the possible reason behind this issue?

2017-05-02 03:54:00,180 [39] ERROR - Failed to execute query
Sdl.Web.Delivery.Service.ServiceQueryException: Failed to execute query ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.OData.Client.ClientEdmModel.<>c__DisplayClass19.<GetOrCreateEdmTypeInternal>b__d(IEdmSchemaElement et)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.OData.Client.ClientEdmModel.GetOrCreateEdmTypeInternal(IEdmStructuredType edmBaseType, Type type, PropertyInfo[] keyProperties, Boolean isEntity, Nullable`1 hasProperties)
   at Microsoft.OData.Client.ClientEdmModel.GetOrCreateEdmType(Type type)
   at Microsoft.OData.Client.ClientEdmModel.CreateEdmProperty(IEdmStructuredType declaringType, PropertyInfo propertyInfo)
   at Microsoft.OData.Client.ClientEdmModel.<>c__DisplayClass19.<GetOrCreateEdmTypeInternal>b__e(EdmEntityTypeWithDelayLoadedProperties entityType)
   at Microsoft.OData.Client.Providers.EdmEntityTypeWithDelayLoadedProperties.EnsurePropertyLoaded()
   at Microsoft.OData.Client.Providers.EdmEntityTypeWithDelayLoadedProperties.get_DeclaredProperties()
   at Microsoft.OData.Client.Metadata.ClientTypeAnnotation.<DiscoverEdmProperties>d__8.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.OData.Client.Metadata.ClientTypeAnnotation.EdmProperties()
   at Microsoft.OData.Client.Metadata.ClientTypeAnnotation.BuildPropertyCache()
   at Microsoft.OData.Client.Metadata.ClientTypeAnnotation.GetProperty(String propertyName, Boolean ignoreMissingProperties)
   at Microsoft.OData.Client.Materialization.StructuralValueMaterializationPolicy.MaterializeDataValues(ClientTypeAnnotation actualType, IEnumerable`1 values, Boolean ignoreMissingProperties)
   at Microsoft.OData.Client.Materialization.EntryValueMaterializationPolicy.MaterializeResolvedEntry(MaterializerEntry entry, Boolean includeLinks)
   at Microsoft.OData.Client.Materialization.ODataEntityMaterializer.DirectMaterializePlan(ODataEntityMaterializer materializer, MaterializerEntry entry, Type expectedEntryType)
   at Microsoft.OData.Client.Materialization.ODataEntityMaterializer.ReadImplementation()
   at Microsoft.OData.Client.MaterializeAtom.MoveNextInternal()
   at Microsoft.OData.Client.MaterializeAtom.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__94`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Sdl.Web.Delivery.Service.MemoryCacheProvider.AddOrGetExisting(String key, Func`1 addFactory, Boolean useCache)
   at Sdl.Web.Delivery.Service.ODataV4Service.<>c__DisplayClass19_0`1.<Execute>b__0()
   --- End of inner exception stack trace ---
   at DynamicModule.ns.Wrapped_ILocalizationResolver_390cbb24db8647618694a34aa022c00f.ResolveLocalization(Uri url)
   at Sdl.Web.Mvc.Configuration.WebRequestContext.GetCurrentLocalization() in C:\TeamCity\buildAgent\work\531db7af87a3c68e\.deploy\source code\web application\Sdl.Web.Mvc\Configuration\WebRequestContext.cs:line 196
   at Sdl.Web.Mvc.Configuration.WebRequestContext.get_Localization() in C:\TeamCity\buildAgent\work\531db7af87a3c68e\.deploy\source code\web application\Sdl.Web.Mvc\Configuration\WebRequestContext.cs:line 23
   at Sdl.Web.Mvc.Statics.StaticContentModule.BeginRequest(Object sender, EventArgs e) in C:\TeamCity\buildAgent\work\531db7af87a3c68e\.deploy\source code\web application\Sdl.Web.Mvc\Statics\StaticContentModule.cs:line 55
2017-05-02 03:54:00,187 [39] ERROR - Internal Server Error
System.Web.HttpException (0x80004005): Internal Server Error ---> Sdl.Web.Delivery.Service.ServiceQueryException: Failed to execute query ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.OData.Client.ClientEdmModel.<>c__DisplayClass19.<GetOrCreateEdmTypeInternal>b__d(IEdmSchemaElement et)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.OData.Client.ClientEdmModel.GetOrCreateEdmTypeInternal(IEdmStructuredType edmBaseType, Type type, PropertyInfo[] keyProperties, Boolean isEntity, Nullable`1 hasProperties)
   at Microsoft.OData.Client.ClientEdmModel.GetOrCreateEdmType(Type type)
   at Microsoft.OData.Client.ClientEdmModel.CreateEdmProperty(IEdmStructuredType declaringType, PropertyInfo propertyInfo)
   at Microsoft.OData.Client.ClientEdmModel.<>c__DisplayClass19.<GetOrCreateEdmTypeInternal>b__e(EdmEntityTypeWithDelayLoadedProperties entityType)
   at Microsoft.OData.Client.Providers.EdmEntityTypeWithDelayLoadedProperties.EnsurePropertyLoaded()
   at Microsoft.OData.Client.Providers.EdmEntityTypeWithDelayLoadedProperties.get_DeclaredProperties()
   at Microsoft.OData.Client.Metadata.ClientTypeAnnotation.<DiscoverEdmProperties>d__8.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.OData.Client.Metadata.ClientTypeAnnotation.EdmProperties()
   at Microsoft.OData.Client.Metadata.ClientTypeAnnotation.BuildPropertyCache()
   at Microsoft.OData.Client.Metadata.ClientTypeAnnotation.GetProperty(String propertyName, Boolean ignoreMissingProperties)
   at Microsoft.OData.Client.Materialization.StructuralValueMaterializationPolicy.MaterializeDataValues(ClientTypeAnnotation actualType, IEnumerable`1 values, Boolean ignoreMissingProperties)
   at Microsoft.OData.Client.Materialization.EntryValueMaterializationPolicy.MaterializeResolvedEntry(MaterializerEntry entry, Boolean includeLinks)
   at Microsoft.OData.Client.Materialization.ODataEntityMaterializer.DirectMaterializePlan(ODataEntityMaterializer materializer, MaterializerEntry entry, Type expectedEntryType)
   at Microsoft.OData.Client.Materialization.ODataEntityMaterializer.ReadImplementation()
   at Microsoft.OData.Client.MaterializeAtom.MoveNextInternal()
   at Microsoft.OData.Client.MaterializeAtom.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__94`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Sdl.Web.Delivery.Service.MemoryCacheProvider.AddOrGetExisting(String key, Func`1 addFactory, Boolean useCache)
   at Sdl.Web.Delivery.Service.ODataV4Service.<>c__DisplayClass19_0`1.<Execute>b__0()
   --- End of inner exception stack trace ---
   at DynamicModule.ns.Wrapped_ILocalizationResolver_390cbb24db8647618694a34aa022c00f.ResolveLocalization(Uri url)
   at Sdl.Web.Mvc.Configuration.WebRequestContext.GetCurrentLocalization() in C:\TeamCity\buildAgent\work\531db7af87a3c68e\.deploy\source code\web application\Sdl.Web.Mvc\Configuration\WebRequestContext.cs:line 196
   at Sdl.Web.Mvc.Configuration.WebRequestContext.get_Localization() in C:\TeamCity\buildAgent\work\531db7af87a3c68e\.deploy\source code\web application\Sdl.Web.Mvc\Configuration\WebRequestContext.cs:line 23
   at Sdl.Web.Mvc.Statics.StaticContentModule.BeginRequest(Object sender, EventArgs e) in C:\TeamCity\buildAgent\work\531db7af87a3c68e\.deploy\source code\web application\Sdl.Web.Mvc\Statics\StaticContentModule.cs:line 82
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2017-05-02 03:54:00,214 [39] ERROR - Exception:An error occurred while resolving evidence using the Context Service.   at Sdl.Web.Tridion.Context.ContextServiceClaimsProvider.GetContextClaims(String aspectName) in C:\TeamCity\buildAgent\work\531db7af87a3c68e\.deploy\source code\web application\Sdl.Web.Tridion\Context\ContextServiceClaimsProvider.cs:line 83
   at DynamicModule.ns.Wrapped_IContextClaimsProvider_7bc41cf2d5c24b3583df10aa29d1fdb8.<GetContextClaims_DelegateImplementation>__0(IMethodInvocation inputs, GetNextInterceptionBehaviorDelegate getNext)
2017-05-02 03:54:00,223 [39] ERROR - Error thrown while showing Server error:An error occurred while resolving evidence using the Context Service.
Indra
  • 511
  • 2
  • 5