nhibernate 错误

Unknown entity class
配置文件没有写好


未处理 NHibernate.MappingException
  Message="Unknown entity class: DebtVO.LoginVO"
  Source="NHibernate"
  StackTrace:
       在 NHibernate.Impl.SessionFactoryImpl.GetPersister(Type theClass)
       在 NHibernate.Impl.SessionImpl.GetClassPersister(Type theClass)
       在 NHibernate.Impl.SessionImpl.GetPersister(Object obj)
       在 NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
       在 MyDebtDAL.DALImpl.SaveEntity(IList entities) 位置 C:\Documents and

Settings\Administrator\My Documents\Visual Studio

2005\Projects\DebtHibernate\MyDebtDAL\DALImpl.cs:行号 45
       在 MyDebtDAL.DALImpl.SaveEntity(IVO entity) 位置 C:\Documents and

Settings\Administrator\My Documents\Visual Studio

2005\Projects\DebtHibernate\MyDebtDAL\DALImpl.cs:行号 36
       在 DebtHibernate.Form1.button1_Click(Object sender, EventArgs e) 位置 C:\Documents and

Settings\Administrator\My Documents\Visual Studio

2005\Projects\DebtHibernate\DebtHibernate\Form1.cs:行号 30
       在 System.Windows.Forms.Control.OnClick(EventArgs e)
       在 System.Windows.Forms.Button.OnClick(EventArgs e)
       在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32

clicks)
       在 System.Windows.Forms.Control.WndProc(Message& m)
       在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
       在 System.Windows.Forms.Button.WndProc(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr

wparam, IntPtr lparam)
       在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       在

System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMs

oComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason,

ApplicationContext context)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,

ApplicationContext context)
       在 System.Windows.Forms.Application.Run(Form mainForm)
       在 DebtHibernate.Program.Main() 位置 C:\Documents and Settings\Administrator\My

Documents\Visual Studio 2005\Projects\DebtHibernate\DebtHibernate\Program.cs:行号 17
       在 System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity,

String[] args)
       在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext,

ContextCallback callback, Object state)
       在 System.Threading.ThreadHelper.ThreadStart()

未处理 NHibernate.ADOException  Could not save object

mysql 类 没有引用 抛了个


未处理 NHibernate.ADOException
  Message="Could not save object"
  Source="NHibernate"
  StackTrace:
       在 NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction

action, Object anything)
       在 NHibernate.Impl.SessionImpl.Save(Object obj)
       在 NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
       在 MyDebtDAL.DALImpl.SaveEntity(IList entities) 位置 C:\Documents and

Settings\Administrator\My Documents\Visual Studio

2005\Projects\DebtHibernate\MyDebtDAL\DALImpl.cs:行号 45
       在 MyDebtDAL.DALImpl.SaveEntity(IVO entity) 位置 C:\Documents and

Settings\Administrator\My Documents\Visual Studio

2005\Projects\DebtHibernate\MyDebtDAL\DALImpl.cs:行号 36
       在 DebtHibernate.Form1.button1_Click(Object sender, EventArgs e) 位置 C:\Documents and

Settings\Administrator\My Documents\Visual Studio

2005\Projects\DebtHibernate\DebtHibernate\Form1.cs:行号 30
       在 System.Windows.Forms.Control.OnClick(EventArgs e)
       在 System.Windows.Forms.Button.OnClick(EventArgs e)
       在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32

clicks)
       在 System.Windows.Forms.Control.WndProc(Message& m)
       在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
       在 System.Windows.Forms.Button.WndProc(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr

wparam, IntPtr lparam)
       在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       在

System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMs

oComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason,

ApplicationContext context)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,

ApplicationContext context)
       在 System.Windows.Forms.Application.Run(Form mainForm)
       在 DebtHibernate.Program.Main() 位置 C:\Documents and Settings\Administrator\My

Documents\Visual Studio 2005\Projects\DebtHibernate\DebtHibernate\Program.cs:行号 17
       在 System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity,

String[] args)
       在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext,

ContextCallback callback, Object state)
       在 System.Threading.ThreadHelper.ThreadStart()




 NHibernate.QueryException

 Message="* only allowed inside aggregate function in SELECT [SELECT * FROM DebtVO.LoginVO]"


改了个 SELECT U FROM USERS U  


未处理 NHibernate.QueryException
  Message="* only allowed inside aggregate function in SELECT [SELECT * FROM DebtVO.LoginVO]"
  Source="NHibernate"
  QueryString="SELECT * FROM DebtVO.LoginVO"
  StackTrace:
       在 NHibernate.Hql.SelectParser.Token(String token, QueryTranslator q)
       在 NHibernate.Hql.ClauseParser.Token(String token, QueryTranslator q)
       在 NHibernate.Hql.ClauseParser.End(QueryTranslator q)
       在 NHibernate.Hql.PreprocessingParser.End(QueryTranslator q)
       在 NHibernate.Hql.ParserHelper.Parse(IParser p, String text, String seperators,

QueryTranslator q)
       在 NHibernate.Hql.QueryTranslator.Compile()
       在 NHibernate.Hql.QueryTranslator.Compile(ISessionFactoryImplementor factory,

IDictionary replacements, Boolean scalar)
       在 NHibernate.Impl.SessionFactoryImpl.GetQuery(String queryString, Boolean shallow)
       在 NHibernate.Impl.SessionImpl.GetQueries(String query, Boolean scalar)
       在 NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters)
       在 NHibernate.Impl.QueryImpl.List()
       在 MyDebtDAL.DALImpl.SelectAll(Type theType) 位置 C:\Documents and

Settings\Administrator\My Documents\Visual Studio

2005\Projects\DebtHibernate\MyDebtDAL\DALImpl.cs:行号 32
       在 DebtHibernate.Form1.button1_Click(Object sender, EventArgs e) 位置 C:\Documents and

Settings\Administrator\My Documents\Visual Studio

2005\Projects\DebtHibernate\DebtHibernate\Form1.cs:行号 40
       在 System.Windows.Forms.Control.OnClick(EventArgs e)
       在 System.Windows.Forms.Button.OnClick(EventArgs e)
       在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32

clicks)
       在 System.Windows.Forms.Control.WndProc(Message& m)
       在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
       在 System.Windows.Forms.Button.WndProc(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr

wparam, IntPtr lparam)
       在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       在

System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMs

oComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason,

ApplicationContext context)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,

ApplicationContext context)
       在 System.Windows.Forms.Application.Run(Form mainForm)
       在 DebtHibernate.Program.Main() 位置 C:\Documents and Settings\Administrator\My

Documents\Visual Studio 2005\Projects\DebtHibernate\DebtHibernate\Program.cs:行号 17
       在 System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity,

String[] args)
       在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext,

ContextCallback callback, Object state)
       在 System.Threading.ThreadHelper.ThreadStart()




转载于:https://www.cnblogs.com/wujun/archive/2006/08/19/481435.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值