与NServicebus的NHibernate Transport问题

时间:2014-07-18 13:26:50

标签: c# nhibernate nservicebus

我正在使用NHibernate和NServiceBus v4一个Web应用程序来发送来自saga的消息。传奇可以发送和处理消息,但是当它发布消息时,订阅者不会收到该消息。此外,没有消息发送到错误队列。

这是在日志文件中找到的唯一抛出的异常。我不确定异常是什么意思以及如何解决错误。

20140717 14:58:42 [10] INFO  NServiceBus.Unicast.Transport.TransportReceiver [(null)] - Failed to process message
    NHibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: Saic.Monitoring.BusinessImplementation.ServiceBus.SagaData.CapabilityRefreshSagaData.Dependencies
       at NHibernate.Engine.Collections.ProcessDereferencedCollection(IPersistentCollection coll, ISessionImplementor session)
       at NHibernate.Engine.Collections.ProcessUnreachableCollection(IPersistentCollection coll, ISessionImplementor session)
       at NHibernate.Event.Default.AbstractFlushingEventListener.FlushCollections(IEventSource session)
       at NHibernate.Event.Default.AbstractFlushingEventListener.FlushEverythingToExecutions(FlushEvent event)
       at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
       at NHibernate.Impl.SessionImpl.Flush()
       at NServiceBus.UnitOfWork.NHibernate.UnitOfWorkManager.NServiceBus.UnitOfWork.IManageUnitsOfWork.End(Exception ex) in c:\BuildAgent\work\5fe88ac992d7874\src\NServiceBus.NHibernate\UnitOfWorkManager.cs:line 48
       at NServiceBus.UnitOfWork.UnitOfWorkBehavior.Invoke(ReceivePhysicalMessageContext context, Action next) in y:\BuildAgent\work\31f8c64a6e8a2d7c\src\NServiceBus.Core\UnitOfWork\UnitOfWorkBehavior.cs:line 26

以下是我要发布的消息:

 public class CapabilityMessage
    {
        public IList<TabularMetrics> TabularMetrics { get; set; }
        public IList<TimeSeriesMetrics> TimeSeriesMetrics { get; set; }
        public IList<UserExperienceMetrics> TabularUserExperienceMetrics { get; set; }
        public IList<Dependency> Dependencies { get; set; }

        public int CapabilityId { get; set; }
        public string Name { get; set; }
        public int MonitoringGroupId { get; set; }
        public CapabilityType Type { get; set; }
        public CapabilityRegionType Region { get; set; }
        public StatusType Status { get; set; }
        public StatusType? OverriddenStatus { get; set; }

    }

0 个答案:

没有答案