Server Error in '/' Application.

No row with the given identifier exists[com.nc.commons.productcatalogue.Product#243]

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: NHibernate.ObjectNotFoundException: No row with the given identifier exists[com.nc.commons.productcatalogue.Product#243]

Source Error:


Line 41: 
Line 42:         // get the selected product
Line 43:         selectedProduct = Product.Find(selectedProductId);
Line 44:         if (selectedProduct == null)
Line 45:         {

Source File: c:\inetpub\vhosts\lambbrand.eu\site1\ps\natureline\PCProduct.aspx.cs    Line: 43

Stack Trace:


[ObjectNotFoundException: No row with the given identifier exists[com.nc.commons.productcatalogue.Product#243]]
   NHibernate.Impl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id) +62
   NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +624
   NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +237
   NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) +1305
   NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) +125
   NHibernate.Impl.SessionImpl.Load(Type clazz, Object id) +258
   Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id, Boolean throwOnNotFound) +208

[NotFoundException: Could not find Product with id 243]
   Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id, Boolean throwOnNotFound) +443
   Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) +86
   PCProduct.Page_Init(Object sender, EventArgs e) in c:\inetpub\vhosts\lambbrand.eu\site1\ps\natureline\PCProduct.aspx.cs:43
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnInit(EventArgs e) +99
   System.Web.UI.Page.OnInit(EventArgs e) +12
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378


Version Information: Microsoft .NET Framework Version:2.0.50727.8800; ASP.NET Version:2.0.50727.8762