“/”应用程序中的服务器错误。

No row with the given identifier exists[Model.T_Category#101]

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: NHibernate.ObjectNotFoundException: No row with the given identifier exists[Model.T_Category#101]

源错误:


行 19:             if (id != StringUtil.DefaultValue)
行 20:             {
行 21:                 Model.T_Category model = BLL.BllBase<Model.T_Category>.GetId(id);
行 22:                 title = model.Title;
行 23:                 parent_id = model.ParentID;

源文件: d:\vhostroot\localuser\dongfang652\www\shop.aspx.cs    行: 21

堆栈跟踪:


[ObjectNotFoundException: No row with the given identifier exists[Model.T_Category#101]]
   NHibernate.Impl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id) +37
   NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +203
   NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +150
   NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) +440
   NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) +191
   NHibernate.Impl.SessionImpl.Load(String entityName, Object id) +234
   NHibernate.Impl.SessionImpl.Load(Type entityClass, Object id) +169
   Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id, Boolean throwOnNotFound) in c:\TeamCity\buildAgent\work\e41ee5ead2eba140\src\Castle.ActiveRecord\Framework\ActiveRecordBase.cs:1181

[NotFoundException: Could not find T_Category with id 101]
   Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id, Boolean throwOnNotFound) in c:\TeamCity\buildAgent\work\e41ee5ead2eba140\src\Castle.ActiveRecord\Framework\ActiveRecordBase.cs:1202
   Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) in c:\TeamCity\buildAgent\work\e41ee5ead2eba140\src\Castle.ActiveRecord\Framework\ActiveRecordBase.Generic.cs:440
   DAL.DalHelper`1.ext_GetId(Int32 id) in D:\企业项目\魅诗嘉丽\DAL\DalHelper.cs:64
   BLL.BllBase`1.GetId(Int32 id) in D:\企业项目\魅诗嘉丽\BLL\BllBase.cs:39
   shop.Page_Load(Object sender, EventArgs e) in d:\vhostroot\localuser\dongfang652\www\shop.aspx.cs:21
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4667.0