0

Environment: Sitecore 9.3

I have created a custom Page Event.

When I am trying to use it throws this error:

48856 14:48:01 ERROR Cannot execute 'sessionEnd:batch:ended' event
Exception: System.AggregateException
Message: One or more exceptions occurred while processing the subscribers to the 'sessionEnd:batch:ended' 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 Sitecore.Kernel.Web.SessionExpirationProcessor.TryRaiseEvent(String eventName, Object[] parameters)

Nested Exception

Exception: System.AggregateException
Message: One or more errors occurred.
Source: Sitecore.Xdb.Common.Web
   at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)
   at Sitecore.XConnect.Client.XConnectSynchronousExtensions.SuspendContextLock(Func`1 taskFactory)
   at Sitecore.Analytics.XConnect.DataAccess.BatchedXdbContextProxy.SubmitBatch()
   at Sitecore.Analytics.XConnect.DataAccess.BatchEnabledXdbRuntimeContext.SubmitBatch()
   at Sitecore.Analytics.Events.BatchEventHandler.OnBatchEnded(Object sender, EventArgs args)
   at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)

Nested Exception

Exception: Sitecore.XConnect.Schema.XdbModelException
Message: The type of this instance does not correspond to any type in the model. The type is Sitecore93.XConnect.Models.Events.PrintEvent
Source: Sitecore.XConnect.Core
   at Sitecore.XConnect.XdbExtensible.Attach(XdbModel model)
   at Sitecore.XConnect.Operations.InteractionOperation.Validate()
   at Sitecore.XConnect.XdbContext.ValidateOperation(IXdbOperation operation)

Following steps taken:

  • Event Model JSON has been deployed to 2 locations: sc.xconnect\App_Data\Models and sc.xconnect\App_Data\jobs\continuous\IndexWorker\App_Data\Models
  • DLL has been deployed to sc\bin, sc.xconnect\bin and sc.xconnect\App_Data\jobs\continuous\AutomationEngine
  • Rebuild Indexes
  • Rebuild Link Databases
  • Deploy marketing definitions

References:

3

Did you create your config file for Sitecore? Deploy the model to core roles at the end of the page

https://doc.sitecore.com/developers/93/sitecore-experience-platform/en/deploy-a-custom-model.html

<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
   <sitecore>
      <xconnect>
         <runtime type="Sitecore.XConnect.Client.Configuration.RuntimeModelConfiguration,Sitecore.XConnect.Client.Configuration">
            <schemas hint="list:AddModelConfiguration">
               <!-- value of 'name' property must be unique -->
               <schema name="documentationmodel" type="Sitecore.XConnect.Client.Configuration.StaticModelConfiguration,Sitecore.XConnect.Client.Configuration" patch:after="schema[@name='collectionmodel']">
                  <param desc="modeltype">Documentation.Model.CollectionModel, Documentation.Model</param>
               </schema>
            </schemas>
         </runtime>
      </xconnect>
   </sitecore>
</configuration>

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.