3

While deleting any item in Content Editor I'm getting

Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Unexpected character encountered while parsing value: <. Path

I checked log files and the full stack trace is as follows:

ERROR Error while deleting items
Exception: System.AggregateException
Message: One or more exceptions occurred while processing the subscribers to the 'item:deleted' event.
Source: Sitecore.Kernel
   at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)
   at Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Sitecore.Data.Engines.EngineCommand`2.RaiseEvent[TArgs](EventHandler`1 handlers, Func`2 argsCreator)
   at Sitecore.Data.Engines.DataEngine.RaiseDeletedItem(Item item, ID parentId, Boolean result)
   at Sitecore.Data.Archiving.SqlArchive.DoArchiveItems(IEnumerable`1 items, ID archivalId)
   at Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func`1 action, Action recover)
   at Sitecore.Data.Archiving.SqlArchive.ArchiveItem(Item item)
   at Sitecore.Shell.Framework.Pipelines.DeleteItems.Delete(List`1 items)
   at Sitecore.Shell.Framework.Pipelines.DeleteItems.Execute(ClientPipelineArgs args)

Nested Exception

Exception: Newtonsoft.Json.JsonReaderException
Message: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
Source: Sitecore.Xdb.Common.Web
   at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)
   at Sitecore.ExperienceAnalytics.Core.Repositories.ReferenceData.ExperienceAnalyticsSegmentReader.GetDefinitionTypeKey()
   at Sitecore.ExperienceAnalytics.Core.Repositories.ReferenceData.ExperienceAnalyticsSegmentReader.Get(Guid key, NameValueCollection readingPreferences)
   at Sitecore.ExperienceAnalytics.Client.Deployment.Events.SegmentDeployedEventHandler.DeleteSegment(Item deletedItem)
   at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)

Does anyone have any idea what can be the reason?

1 Answer 1

4

I checked SegmentDeployedEventHandler functionality and digged in the code deep enough to find that it calls IReferenceDataClient.EnsureDefinitionType.

In my case it was using ReferenceDataHttpClient to get the data from Sitecore Reference Data Service and that service site was for some reason stopped on IIS Server.

So instead of returning json response it was a 404 response from IIS.

After starting XRef site again, exception while deleting items was gone.

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.