我在Crm 4.0汇总14中有自定义工作流程程序集,其中有大约10个活动,每次我更改它我得到一个unknknown错误,它无法更新。尝试浏览Crm中的工作流设计器时,这也会导致NullRerferenceException。
奇怪的是,它只发生在这个程序集中,如果我删除它并从头重新添加它就可以了。
这是我得到的错误......
未处理的异常:System.Web.Services.Protocols.SoapException:服务器无法处理请求。 详情:
0x80040216
一个意料之外的问题发生了。 平台 在System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage消息,WebResponse响应,流responseStream,布尔asyncCall) 在System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,Object []参数) 在PluginRegistrationTool.CrmSdk.CrmService.Create(BusinessEntity实体) 在PluginRegistrationTool.RegistrationHelper.RegisterPluginType(CrmOrganization org,CrmPlugin插件) 在PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender,EventArgs e)
当我启用跟踪时,我得到以下错误,有没有人知道从哪里开始?
对于这个跟踪日志的大转储感到抱歉......
在期望对象id的单个属性时无法检索引用的属性:{45D0F927-5258-E111-AD6A-000C2954073E} [2012-02-29 08:45:50.1]流程:w3wp |组织:a9ae572d-fabe-4c6c-9a39-8d8882462a55 |主题:21 |分类:平台|用户:d6ef60ac-4638-de11-ba36-000f1f66b919 |等级:错误| MessageProcessor.Execute 在MessageProcessor.Execute(PipelineExecutionContext context) at InternalMessageDispatcher.Execute(PipelineExecutionContext context) 在ExternalMessageDispatcher.Execute(String messageName,Int32 primaryObjectTypeCode,Int32 secondaryObjectTypeCode,PropertyBag fields,CorrelationToken correlationToken,CallerOriginToken originToken,UserAuth userAuth,Guid callerId) at CrmServiceInternal.Create(String namespaceName,BusinessEntityBase entity,CorrelationToken correlationToken,CallerOriginToken originToken,UserAuth userAuth,Guid callerId) 在CrmService.Create(BusinessEntity实体) at RuntimeMethodHandle._InvokeMethodFast(Object target,Object [] arguments,SignatureStruct& sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner) at RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object [] parameters,CultureInfo culture,Boolean skipVisibilityChecks) at RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化) at LogicalMethodInfo.Invoke(Object target,Object [] values) 在WebServiceHandler.Invoke() 在WebServiceHandler.CoreProcessRequest() 在SyncSessionlessHandler.ProcessRequest(HttpContext上下文) 在CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) 在ApplicationStepManager.ResumeSteps(异常错误) 在HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context,AsyncCallback cb,Object extraData) 在HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) 在HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr) 在ISAPIRuntime.ProcessRequest(IntPtr ecb,Int32 iWRType)
MessageProcessor无法处理消息'创建'对于'插件类型'。 [2012-02-29 08:45:50.2]流程:w3wp |组织:a9ae572d-fabe-4c6c-9a39-8d8882462a55 |主题:21 |分类:Platform.Sdk |用户:d6ef60ac-4638-de11-ba36-000f1f66b919 |等级:错误| CompositeSoapExtensionExceptionHandler.Handle 在CompositeSoapExtensionExceptionHandler.Handle(Stream to,Stream from,Exception exception) 在CrmAuthenticationSoapExtensionBase.ProcessMessage(SoapMessage消息) 在SoapMessage.RunExtensions(SoapExtension []扩展,Boolean throwOnException) 在SoapServerProtocol.WriteException(例外e,流outputStream) at WebServiceHandler.WriteException(Exception e) 在WebServiceHandler.Invoke() 在WebServiceHandler.CoreProcessRequest() 在SyncSessionlessHandler.ProcessRequest(HttpContext上下文) 在CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) 在ApplicationStepManager.ResumeSteps(异常错误) 在HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context,AsyncCallback cb,Object extraData) 在HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) 在HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr) 在ISAPIRuntime.ProcessRequest(IntPtr ecb,Int32 iWRType) CrmSoapExtension检测到非CrmException - 报告将发送给Watson: System.Web.Services.Protocols.SoapException:服务器无法处理请求。 ---> System.Reflection.TargetInvocationException:调用目标抛出了异常。 ---> System.NullReferenceException:未将对象引用设置为对象的实例。 在Microsoft.Crm.ObjectModel.PluginTypeServiceInternal
1.CheckDuplicateActivityName(String name, ExecutionContext context) at Microsoft.Crm.ObjectModel.PluginTypeServiceInternal
1.ValidateCustomActivity(PluginType实体,ExecutionContext上下文) 在Microsoft.Crm.ObjectModel.PluginTypeServiceInternal`1.Create(IBusinessEntity实体,ExecutionContext上下文) ---内部异常堆栈跟踪结束--- at System.RuntimeMethodHandle._InvokeMethodFast(Object target,Object [] arguments,SignatureStruct& sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object [] parameters,CultureInfo culture,Boolean skipVisibilityChecks) 在System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化) 在System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target,Object [] values) 在Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext context) 在Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context) 在Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context) 在Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context) 在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.CrmServiceInternal.Create(String namespaceName,BusinessEntityBase entity,CorrelationToken correlationToken,CallerOriginToken originToken,UserAuth userAuth,Guid callerId) 在Microsoft.Crm.Sdk.Crm2007.CrmService.Create(BusinessEntity实体) ---内部异常堆栈跟踪结束---
[2012-02-29 08:46:03.7]流程:w3wp |组织结构:a9ae572d-fabe-4c6c-9a39-8d8882462a55 |主题:21 |分类:平台|用户:d6ef60ac-4638-de11-ba36-000f1f66b919 |等级:错误| MessageProcessor.Execute 在MessageProcessor.Execute(PipelineExecutionContext context) at InternalMessageDispatcher.Execute(PipelineExecutionContext context) 在ExternalMessageDispatcher.Execute(String messageName,Int32 primaryObjectTypeCode,Int32 secondaryObjectTypeCode,PropertyBag fields,CorrelationToken correlationToken,CallerOriginToken originToken,UserAuth userAuth,Guid callerId) at CrmServiceInternal.Create(String namespaceName,BusinessEntityBase entity,CorrelationToken correlationToken,CallerOriginToken originToken,UserAuth userAuth,Guid callerId) 在CrmService.Create(BusinessEntity实体) at RuntimeMethodHandle._InvokeMethodFast(Object target,Object [] arguments,SignatureStruct& sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner) at RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object [] parameters,CultureInfo culture,Boolean skipVisibilityChecks) at RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化) at LogicalMethodInfo.Invoke(Object target,Object [] values) 在WebServiceHandler.Invoke() 在WebServiceHandler.CoreProcessRequest() 在SyncSessionlessHandler.ProcessRequest(HttpContext上下文) 在CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) 在ApplicationStepManager.ResumeSteps(异常错误) 在HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context,AsyncCallback cb,Object extraData) 在HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) 在HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr) 在ISAPIRuntime.ProcessRequest(IntPtr ecb,Int32 iWRType)
MessageProcessor无法处理消息'创建'对于'插件类型'。 [2012-02-29 08:46:03.7]流程:w3wp |组织:a9ae572d-fabe-4c6c-9a39-8d8882462a55 |主题:21 |分类:Platform.Sdk |用户:d6ef60ac-4638-de11-ba36-000f1f66b919 |等级:错误| CompositeSoapExtensionExceptionHandler.Handle 在CompositeSoapExtensionExceptionHandler.Handle(Stream to,Stream from,Exception exception) 在CrmAuthenticationSoapExtensionBase.ProcessMessage(SoapMessage消息) 在SoapMessage.RunExtensions(SoapExtension []扩展,Boolean throwOnException) 在SoapServerProtocol.WriteException(例外e,流outputStream) at WebServiceHandler.WriteException(Exception e) 在WebServiceHandler.Invoke() 在WebServiceHandler.CoreProcessRequest() 在SyncSessionlessHandler.ProcessRequest(HttpContext上下文) 在CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) 在ApplicationStepManager.ResumeSteps(异常错误) 在HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context,AsyncCallback cb,Object extraData) 在HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) 在HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr) 在ISAPIRuntime.ProcessRequest(IntPtr ecb,Int32 iWRType) CrmSoapExtension检测到非CrmException - 报告将发送给Watson: System.Web.Services.Protocols.SoapException:服务器无法处理请求。 ---> System.Reflection.TargetInvocationException:调用目标抛出了异常。 ---> System.NullReferenceException:未将对象引用设置为对象的实例。 在Microsoft.Crm.ObjectModel.PluginTypeServiceInternal
1.CheckDuplicateActivityName(String name, ExecutionContext context) at Microsoft.Crm.ObjectModel.PluginTypeServiceInternal
1.ValidateCustomActivity(PluginType实体,ExecutionContext上下文) 在Microsoft.Crm.ObjectModel.PluginTypeServiceInternal`1.Create(IBusinessEntity实体,ExecutionContext上下文) ---内部异常堆栈跟踪结束--- at System.RuntimeMethodHandle._InvokeMethodFast(Object target,Object [] arguments,SignatureStruct& sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object [] parameters,CultureInfo culture,Boolean skipVisibilityChecks) 在System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化) 在System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target,Object [] values) 在Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext context) 在Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context) 在Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context) 在Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context) 在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.CrmServiceInternal.Create(String namespaceName,BusinessEntityBase entity,CorrelationToken correlationToken,CallerOriginToken originToken,UserAuth userAuth,Guid callerId) 在Microsoft.Crm.Sdk.Crm2007.CrmService.Create(BusinessEntity实体) ---内部异常堆栈跟踪结束---
答案 0 :(得分:2)
我看到的关键部分是按细节递增的顺序:
MessageProcessor无法为'plugintype'
处理消息'Create'Microsoft.Crm.ObjectModel.PluginTypeServiceInternal1。的 CheckDuplicateActivityName 强>
在期望对象id的单个属性时无法检索引用的属性:{45D0F927-5258-E111-AD6A-000C2954073E}
所以我希望Anwar是正确的,这是重复的。更具体地说,该程序集有一个与现有插件同名的插件。尝试从插件表中选择并查看名称。
select name, * from plugintype
name字段将是自定义程序集中的类名,并且不能重复。您可以识别插件类,因为它们继承自Microsoft.Xrm.Sdk.IPlugin。