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

attempted to assign id from null one-to-one property: Cascade_Employee

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

异常详细信息: NHibernate.Id.IdentifierGenerationException: attempted to assign id from null one-to-one property: Cascade_Employee

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[IdentifierGenerationException: attempted to assign id from null one-to-one property: Cascade_Employee]
   NHibernate.Id.ForeignGenerator.Generate(ISessionImplementor sessionImplementor, Object obj) +457
   NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) +125
   NHibernate.Event.Default.DefaultMergeEventListener.MergeTransientEntity(Object entity, String entityName, Object requestedId, IEventSource source, IDictionary copyCache) +434
   NHibernate.Event.Default.DefaultMergeEventListener.EntityIsTransient(MergeEvent event, IDictionary copyCache) +290
   NHibernate.Event.Default.DefaultMergeEventListener.OnMerge(MergeEvent event, IDictionary copiedAlready) +1298
   NHibernate.Event.Default.DefaultMergeEventListener.OnMerge(MergeEvent event) +94
   NHibernate.Impl.SessionImpl.FireMerge(MergeEvent event) +94
   NHibernate.Impl.SessionImpl.Merge(String entityName, Object obj) +107
   Spring.Data.NHibernate.HibernateTemplate.Execute(IHibernateCallback action, Boolean exposeNativeSession) +247

[HibernateSystemException: attempted to assign id from null one-to-one property: Cascade_Employee]
   Spring.Data.NHibernate.HibernateTemplate.Execute(IHibernateCallback action, Boolean exposeNativeSession) +497
   WonderFramework.Dao.Implement.BaseDAO`2.MergeUpdate(T entity) +79
   WonderFramework.Service.Implement.BaseBLO`2.MergeUpdate(T entity) +77
   CompositionAopProxy_f114c4a1da4542518e49a4e75a6f35b6.MergeUpdate(User entity) +315
   _dynamic_CompositionAopProxy_f114c4a1da4542518e49a4e75a6f35b6.MergeUpdate(Object , Object[] ) +104
   Spring.Aop.Framework.DynamicMethodInvocation.InvokeJoinpoint() +165
   Spring.Transaction.Interceptor.TransactionInterceptor.Invoke(IMethodInvocation invocation) +229
   CompositionAopProxy_19ee766cf1f34cbd9a93b69b2c8c699e.MergeUpdate(User entity) +232
   Eps.Bus.HomeSite.Service.Implement.HomeSiteServiceBLO.LogoutClearCookie() in E:\Project\18、大土河\大土河物资V4.9.9\源代码V4.0\WebSite\Eps.Bus.HomeSite\Service\Implement\HomeSiteServiceBLO.cs:756
   _dynamic_Eps.Bus.HomeSite.Service.Implement.HomeSiteServiceBLO.LogoutClearCookie(Object , Object[] ) +61
   Spring.Aop.Framework.DynamicMethodInvocation.InvokeJoinpoint() +165
   Spring.Aop.Framework.Adapter.AfterReturningAdviceInterceptor.Invoke(IMethodInvocation invocation) +34
   CompositionAopProxy_8125c63ab233405d83ca446c6a554c92.LogoutClearCookie() +189
   CompositionAopProxy_3cbd3b55c1a8484081fe476ed5ab2c21.LogoutClearCookie() +269
   Eps.Bus.HomeSiteCtrl.Controllers.RegisterController.Logout() +61
   System.Web.Mvc.<>c__DisplayClass10_0.<WrapVoidAction>b__0(ControllerBase controller, Object[] parameters) +18
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +70
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__11_0() +72
   System.Web.Mvc.Async.<>c__DisplayClass11_1.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +387
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass3_6.<BeginInvokeAction>b__3() +50
   System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__5(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +26
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +68
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +40
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +68
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +602
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128


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