使用Hibernate架构做的项目 ,发布之后在本地测试,报如下错误
异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。
源错误:
行 27: private void OpenSession()
行 28: {
行 29: Session = HibernateFactory.SessionFactory.OpenSession();
行 30: }
行 31:
源文件: E:\HGAI\Realty\Realty\src\DataAccess\Hibernate\QueryManager.cs 行: 29
堆栈跟踪:
[NullReferenceException: 未将对象引用设置到对象的实例。]
Realty.DataAccess.QueryManager.OpenSession() in E:\HGAI\Realty\Realty\src\DataAccess\Hibernate\QueryManager.cs:29
Realty.DataAccess.QueryManager..ctor() in E:\HGAI\Realty\Realty\src\DataAccess\Hibernate\QueryManager.cs:19
Realty.DataAccess.HibernateFactory.GetQueryManager() in E:\HGAI\Realty\Realty\src\DataAccess\Hibernate\HibernateFactory.cs:23
Realty.DataAccess.Power.EmployeePasswordAccess.GetEmployeePasswordByAlias(String alias) in E:\HGAI\Realty\Realty\src\DataAccess\Power\EmployeePasswordAccess.cs:18
Realty.BusinessRules.Power.EmployeePasswordRules.GetEmployeePasswordByAlias(String alias) in E:\HGAI\Realty\Realty\src\BusinessRules\Power\EmployeePasswordRules.cs:20
Realty.BusinessRules.Power.EmployeePasswordRules.GetEmployeeByAliasPassword(String alias, String password) in E:\HGAI\Realty\Realty\src\BusinessRules\Power\EmployeePasswordRules.cs:38
Realty.BusinessFacade.Power.EmployeePowerFacade.GetEmployeeByAliasPassword(String alias, String password) in E:\HGAI\Realty\Realty\src\BusinessFacade\Power\EmployeePowerFacade.cs:37
Realty.Web.Login.ImageButton1_Click(Object sender, ImageClickEventArgs e) +72
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +105
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
[解决办法]
不用 NHB 好多年了...
[解决办法]
学习
帮顶