我正在使用 Nservicebus 6.2.0 版和 rabitMQ 传输(NServiceBus.RabbitMQ 5.0.0 版)。我在处理程序的服务总线上收到错误
错误 NServiceBus.RecoverabilityExecutor 将消息“34894416-ea8a-4d5a-ae41-a95e00f51a35”移动到错误队列“错误”,因为处理因异常而失败:NServiceBus.MessageDeserializationException:尝试从传输消息 34894416 中提取逻辑消息时发生错误- ea8a-4d5a-ae41-a95e00f51a35 ---> NHibernate.LazyInitializationException: Initializing[Unavailable#]-未能延迟初始化集合,在 NHibernate.Collection.AbstractPersistentCollection.ThrowLazyInitializationException(String message) in c:\源代码控制\Git\nhibernate-core\src\NHibernate\Collection\AbstractPersistentCollection.cs:在 C 中 NHibernate.Collection.AbstractPersistentCollection.ThrowLazyInitializationExceptionIfNotConnected() 的第 483 行:\Source control\Git\nhibernate-core\src\NHibernate\Collection\AbstractPersistentCollection.cs:NHibernate.Collection.AbstractPersistentCollection.Initialize(Boolean writing) in c:\Source control\Git\nhibernate-core\src\NHibernate 中的第 477 行\Collection\AbstractPersistentCollection.cs:NHibernate.Collection.AbstractPersistentCollection.Write() 中 c:\Source control\Git\nhibernate-core\src\NHibernate\Collection\AbstractPersistentCollection.cs 的第 465 行:NHibernate.Collection.PersistentBag 的第 362 行.Add(对象值)在 c:\Source control\Git\nhibernate-core\src\NHibernate\Collection\PersistentBag.cs:Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList 列表,JsonReader 阅读器,JsonArrayContract 合同的第 379 行, JsonProperty containerProperty, String id) 在 Newtonsoft.Json.Serialization。Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties 的 JsonSerializerInternalReader.CreateList(JsonReader 阅读器,类型 objectType,JsonContract 合同,JsonProperty 成员,对象现有值,字符串 id)(JsonReader 阅读器,Type& objectType,JsonContract& 合同,JsonProperty 成员,JsonContainerContract containerContract,JsonProperty containerMember , Object existingValue, Object& newValue, String& id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader .SetPropertyValue(JsonProperty 属性, JsonConverter propertyConverter,JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader阅读器,类型 objectType,JsonContract 合同,JsonProperty 成员,JsonContainerContract containerContract,JsonProperty containerMember,Object existingValue)在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty 属性,JsonConverter propertyConverter,JsonContainerContract containerContract,JsonProperty containerProperty,JsonReader 阅读器,对象目标)在Newtonsoft.Json.Serialization.JsonSerializerInternalReader。PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member , 字符串 id) 在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader。在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty 属性、JsonConverter propertyConverter、JsonContainerContract containerContract、JsonProperty containerProperty、JsonReader reader、Object目标) 在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member , JsonContainerContract containerContract, JsonProperty containerMember,Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty) 中的对象 existingValue) Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties (JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id) 在 Newtonsoft.Json .Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member,JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer .Deserialize[T](JsonReader reader) at NServiceBus.DeserializeLogicalMessagesConnector.Extract(IncomingMessage physicalMessage) 在 C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Pipeline\Incoming\DeserializeLogicalMessagesConnector.cs:NServiceBus.DeserializeLogicalMessagesConnector 的第 115 行。 C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Pipeline\Incoming\DeserializeLogicalMessagesConnector.cs 中的 ExtractWithExceptionHandling(IncomingMessage 消息):第 44 行 --- 内部异常堆栈跟踪结束 --- 在 C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Pipeline\Incoming\DeserializeLogicalMessagesConnector.cs: 中的 NServiceBus.DeserializeLogicalMessagesConnector.ExtractWithExceptionHandling(IncomingMessage message) 处结束在 C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Pipeline\Incoming\DeserializeLogicalMessagesConnector.cs:line 29 中的 NServiceBus.DeserializeLogicalMessagesConnector.d__1.MoveNext() 处 --- 从引发异常的上一个位置结束堆栈跟踪--- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 NServiceBus.InvokeAuditPipelineBehavior.d__1.MoveNext() 在 C:\BuildAgent\work\3206e2123f54fce4\src \N服务总线。Core\Audit\InvokeAuditPipelineBehavior.cs:第 18 行 --- 从先前引发异常的位置结束堆栈跟踪 --- 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()任务任务)在 C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\UnitOfWork\UnitOfWorkBehavior.cs:line 52 中的 NServiceBus.UnitOfWorkBehavior.d__1.MoveNext() 中的 NServiceBus.UnitOfWorkBehavior.d__1.MoveNext() 中的异常所在位置的堆栈跟踪结束抛出 --- 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 C:\BuildAgent\work\3206e2123f54fce4\ 的 NServiceBus.ReceivePerformanceDiagnosticsBehavior.d__2.MoveNext()源\NServiceBus。Core\Performance\Statistics\ReceivePerformanceDiagnosticsBehavior.cs:第 40 行 --- 在 System.Runtime.CompilerServices.TaskAwaiter 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 处从先前引发异常的位置结束堆栈跟踪。 HandleNonSuccessAndDebuggerNotification(Task task) at NServiceBus.MutateIncomingTransportMessageBehavior.d__1.MoveNext() in C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\MessageMutators\MutateTransportMessage\MutateIncomingTransportMessageBehavior.cs:line 43 --- 堆栈跟踪结束引发异常的位置 --- 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 NServiceBus.ProcessingStatisticsBehavior.d__0 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()。C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Performance\Statistics\ProcessingStatisticsBehavior.cs:line 27 中的 MoveNext() --- 在 System.Runtime 处从先前引发异常的位置结束堆栈跟踪.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 NServiceBus.AzureServiceBus.TransactionScopeSuppressBehavior.d__0.MoveNext() 在 C:\BuildAgent\work\2f57832e2eee436e\src\Transport\Receiving\ TransactionScopeSuppressBehavior.cs:第 23 行 --- 从先前引发异常的位置结束堆栈跟踪 --- 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()服务总线。C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Pipeline\Incoming\TransportReceiveToPhysicalMessageProcessingConnector.cs:line 37 中的 TransportReceiveToPhysicalMessageProcessingConnector.d__1.MoveNext() --- 堆栈跟踪从上一个引发异常的位置结束---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 NServiceBus.MainPipelineExecutor.d__1.MoveNext() 在 C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus。 Core\Pipeline\MainPipelineExecutor.cs:第 32 行 --- 在 System.Runtime.CompilerServices.TaskAwaiter 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 处从先前引发异常的位置结束堆栈跟踪。HandleNonSuccessAndDebuggerNotification(Task task) at NServiceBus.Transport.RabbitMQ.MessagePump.d__29.MoveNext() in C:\BuildAgent\work\ef98ad7376e3379a\src\NServiceBus.RabbitMQ\Receiving\MessagePump.cs:line 249