locked
General error in scheduling engine in new installation: ResourceId cannot be found RRS feed

  • Question

  • Hello,

    I have a problem with a new installation of Crm 4.0 (the norwegian version) and I wonder if it could be an error in the latest updated installation file.

    Everything seem to be normal, I didn't get any error messages in the installation log, but when I try to book a service I get this error in the error log:

    Error: Exception has been thrown by the target of an invocation.
    Error Number: 0x80040217
    Error Message: Resource With Id = 8ff9394b-9802-de11-b540-000c299e8107 Does Not Exist
    Error Details: Resource With Id = 8ff9394b-9802-de11-b540-000c299e8107 Does Not Exist
    Source File: Not available
    Line Number: Not available
    Request URL: http://localhost:5555/Demo/AppWebServices/ActivitiesWebService.asmx
    Stack Trace Info: [CrmObjectNotFoundException: Resource With Id = 8ff9394b-9802-de11-b540-000c299e8107 Does Not Exist]
    at Microsoft.Crm.Scheduling.Engine.SchedulingObjectFactoryBase.GetResource(Guid id, SchedulingContext context)
    at Microsoft.Crm.Scheduling.Engine.StopwatchFactoryProxy.GetResource(Guid id, SchedulingContext context)
    at Microsoft.Crm.Scheduling.Engine.Strategy.ValidateBook(AppointmentRequest request, AppointmentProposal proposal, SchedulingContext context)
    at Microsoft.Crm.Scheduling.Engine.StrategyBroker.ValidateBook(AppointmentRequest request, AppointmentProposal proposal, SchedulingContext context)
    at Microsoft.Crm.Scheduling.ScheduleValidateBookCommand.Execute(ISchedulingExecutionContext context)
    at Microsoft.Crm.ObjectModel.ScheduleService.InternalValidate(AppointmentRequest request, AppointmentProposal proposal, Guid activityId, ExecutionContext context)
    at Microsoft.Crm.ObjectModel.ScheduleService.InternalValidate(AppointmentRequest request, AppointmentProposal proposal, ExecutionContext context)
    at Microsoft.Crm.ObjectModel.ScheduleService.BookAction.LockedTransactedExecute()
    at Microsoft.Crm.ObjectModel.ScheduleService.LockedTransactedValidationAction.TransactedExecute()
    at Microsoft.Crm.ObjectModel.ScheduleService.TransactedValidationAction.Execute()
    at Microsoft.Crm.ObjectModel.ScheduleService.Book(CommunicationActivity activity, ExecutionContext context)
    at Microsoft.Crm.ObjectModel.ServiceAppointmentService.Book(BusinessEntity entity, ExecutionContext context)
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
    at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext context)
    at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    at Microsoft.Crm.Sdk.RequestBase.Process(Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    at Microsoft.Crm.Sdk.RequestBase.Process(CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    at Microsoft.Crm.Sdk.CrmServiceInternal.Execute(RequestBase request, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    at Microsoft.Crm.Sdk.InProcessCrmService.Execute(Object request)
    at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()
    at Microsoft.Crm.Application.Platform.ServiceCommands.BookCommand.Execute()
    at Microsoft.Crm.Application.Platform.DataSource.Book(Entity activity)
    at Microsoft.Crm.Application.WebServices.ActivitiesWebService.Book(XmlNode content, Int32 typeCode)'

    I've checked if the resource with the id exists in the FilteredResource view and it does.

    I've also checked what is called in the sql profiler, to see if I could get wizer from that. It seems to fail after this query: 

    exec sp_executesql N'select service0.AnchorOffset as ''anchoroffset'', service0.ResourceSpecId as ''resourcespecid'', service0.IsSchedulable as ''isschedulable'', service0.Granularity as ''granularity'', service0.InitialStatusCode as ''initialstatuscode'', service0.StrategyId as ''strategyid'', service0.Name as ''name'', service0.CalendarId as ''calendarid'', service0.OrganizationId as ''organizationid'', service0.Duration as ''duration'', service0.ResourceSpecIdDsc as ''resourcespeciddsc'', service0.ResourceSpecIdName as ''resourcespecidname'', service0.OrganizationIdDsc as ''organizationiddsc'', service0.OrganizationIdName as ''organizationidname'', service0.ServiceId as ''serviceid'' from Service as service0 where ((service0.DeletionStateCode in (@DeletionStateCode0)) and (service0.ServiceId = @ServiceId0))',N'@DeletionStateCode0 int,@ServiceId0 uniqueidentifier',@DeletionStateCode0=0,@ServiceId0='90F9394B-9802-DE11-B540-000C299E8107'

    The result it returns when I call it directly on the sqlserver seems nothing wrong with when I compare it to similar query on the installation in the production environment where I don't have any problems with the scheduling engine.

    I'm also not able to add a resource rule that contains a selection rule. Than I don't get any errors in the client interface, I only discovered it when I opened the rule again and it was not changed. The error log shows this error: 

    at CrmDelayedOperationPreemptedException..ctor(String message)
    at DelayedExecution.Wait()
    at DelayedExecution.WaitThenExecute(SqlExecutionContext context, Guid interProcessId, Int32 delayInMinutes, Int32 stampVerificationFrequencyInSeconds)
    at PublishResourceGroupsService.PublishResourceGroups(Object objOrganizationId)
    at _ThreadPoolWaitCallback.WaitCallback_Context(Object state)
    at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at _ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
    at _ThreadPoolWaitCallback.PerformWaitCallback(Object state)
    >Crm Exception: Message: Publish Resource Groups operation preempted by a newer event before publication process., ErrorCode: -2147220970, InnerException: System.InvalidOperationException: Publish Resource Groups operation preempted by a newer event before publication process.


    I really hope someone can help with this issue as I'm getting pretty desperate! I need to get this installation working on my vmware image or else I can't go on with any developing for my customer, and deadline is getting closer....

    By the way I've installed Crm five times only to discover the same issue. I also thought it could be something with the vmware image it was installed on, so I created a new image from the bottom only to discover the same errors when ready installing crm on it...

    Regards, Kristine

    Wednesday, February 25, 2009 8:59 AM

Answers

  • Solved it. Seemed out I had to install crm rollup 2. I thought that was not necessary since I downloaded the most recent installation files... I wish I had figured that out a bit sooner...
    Wednesday, February 25, 2009 1:37 PM