当前位置:编程学习 > C#/ASP.NET >>

N-hibernate多对多关系xml文件,运行时报无法编译节点的错误!!急,小弟先谢过了

未处理 NHibernate.MappingException
  Message="Could not compile the mapping document: PMN.Model.WorkstationInfo.hbm.xml"
  Source="NHibernate"
  StackTrace:
       在 NHibernate.Cfg.Configuration.LogAndThrow(MappingException me)
       在 NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc)
       在 NHibernate.Cfg.Configuration.ProcessMappingsQueue()
       在 NHibernate.Cfg.Configuration.AddDocumentThroughQueue(NamedXmlDocument document)
       在 NHibernate.Cfg.Configuration.AddXmlReader(XmlTextReader hbmReader, String name)
       在 NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name)
       在 NHibernate.Cfg.Configuration.AddResource(String path, Assembly assembly)
       在 NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly)
       在 NHibernate.Cfg.Configuration.AddAssembly(String assemblyName)
       在 NHibernate.Cfg.Configuration.DoConfigure(XmlDocument doc)
       在 NHibernate.Cfg.Configuration.Configure(XmlTextReader reader)
       在 NHibernate.Cfg.Configuration.Configure(String fileName)
       在 NHibernate.Cfg.Configuration.Configure()
       在 PMN.BLL.HibernateHelper.getSessionFactory() 位置 D:\监狱系统第七次备份\pmn\pmnpro\src\BLL\HibernateHelper.cs:行号 20
       在 PMN.BLL.HibernateHelper.getSession() 位置 D:\监狱系统第七次备份\pmn\pmnpro\src\BLL\HibernateHelper.cs:行号 37
       在 PMN.BLL.Common.getByHql(String hql, Int32 maxResults) 位置 D:\监狱系统第七次备份\pmn\pmnpro\src\BLL\Common.cs:行号 107
       在 PMN.BLL.Operator.getAllInOperator(Int32 maxResults) 位置 D:\监狱系统第七次备份\pmn\pmnpro\src\BLL\Operator.cs:行号 47
       在 PMN.Client.SysAdmin.Main.menuUserManagement_Click(Object sender, EventArgs e) 位置 D:\监狱系统第七次备份\pmn\pmnpro\src\Client\SysAdmin\Main.cs:行号 34
       在 System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       在 System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
       在 System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       在 System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       在 System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       在 System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       在 System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       在 System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
       在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       在 System.Windows.Forms.Control.WndProc(Message& m)
       在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       在 System.Windows.Forms.ToolStrip.WndProc(Message& m)
       在 System.Windows.Forms.ToolStripDropDown.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.IMsoComponentManager.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.Form.ShowDialog(IWin32Window owner)
       在 System.Windows.Forms.Form.ShowDialog()
       在 PMN.Client.Login.btnLogin_Click(Object sender, EventArgs e) 位置 D:\监狱系统第七次备份\pmn\pmnpro\src\Client\Login.cs:行号 41
       在 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.IMsoComponentManager.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)
       在 Client.Program.Main() 位置 D:\监狱系统第七次备份\pmn\pmnpro\src\Client\Program.cs:行号 19
       在 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()
  InnerException: NHibernate.MappingException
       Message="persistent class PMN.Model.WorkStationInfo, PMN.Model not found"
       Source="NHibernate"
       StackTrace:
            在 NHibernate.Cfg.HbmBinder.ClassForFullNameChecked(String fullName, String errorMessage)
            在 NHibernate.Cfg.HbmBinder.BindClass(XmlNode node, PersistentClass model, Mappings mappings)
            在 NHibernate.Cfg.HbmBinder.BindRootClass(XmlNode node, RootClass model, Mappings mappings)
            在 NHibernate.Cfg.HbmBinder.BindRoot(XmlDocument doc, Mappings mappings)
            在 NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc)
       InnerException: System.TypeLoadException
            Message="未能从程序集“PMN.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”中加载类型“PMN.Model.WorkStationInfo”。"
            Source="mscorlib"
            TypeName="PMN.Model.WorkStationInfo"
            StackTrace:
                 在 System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase)
                 在 System.Reflection.Assembly.GetType(String name, Boolean throwOnError)
                 在 NHibernate.Util.ReflectHelper.TypeFromAssembly(AssemblyQualifiedTypeName name, Boolean throwOnError)
                 在 NHibernate.Util.ReflectHelper.ClassForName(String name)
                 在 NHibernate.Cfg.HbmBinder.ClassForFullNameChecked(String fullName, String errorMessage)
            InnerException: 
--------------------编程问答-------------------- 把配置文件贴出来看看,多注意命名空间.

ps: 代码不用vss 或者tfs 管理的?
补充:.NET技术 ,  .NET技术前瞻
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,