I'm generating my first small app. installation using the provided utility in VS 2005. The generation is ok, the problem comes executing the setup.exe of my app, that seems not to find hibernate.cfg.xml
During development I had no problem at all. I have the cfg file as an “incrusted resource” and “copy always”.
Id appreciate your help.
Thanx,
Guillermo
Hibernate version:
1.2.0.GA
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
************** Texto de la excepción **************
NHibernate.HibernateException: problem parsing configuration : System.IO.FileNotFoundException: No se pudo encontrar el archivo 'C:\Documents and Settings\Guillermo Najar\Configuración local\Apps\2.0\67054VK3.TAG\0ZTAC31E.L37\bloc..tion_9ed459f7d8a28c65_0001.0000_e6b9082f7838f903\hibernate.cfg.xml'.
Nombre de archivo: 'C:\Documents and Settings\Guillermo Najar\Configuración local\Apps\2.0\67054VK3.TAG\0ZTAC31E.L37\bloc..tion_9ed459f7d8a28c65_0001.0000_e6b9082f7838f903\hibernate.cfg.xml'
en System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
en System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
en System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
en System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)
en System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
en System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
en System.Threading.CompressedStack.runTryCode(Object userData)
en System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
en System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
en System.Xml.XmlTextReaderImpl.OpenUrl()
en System.Xml.XmlTextReaderImpl.Read()
en System.Xml.XmlTextReader.Read()
en System.Xml.XmlValidatingReaderImpl.Read()
en System.Xml.XmlValidatingReader.Read()
en System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
en System.Xml.XmlDocument.Load(XmlReader reader)
en NHibernate.Cfg.Configuration.Configure(XmlTextReader reader)
en NHibernate.Cfg.Configuration.Configure(XmlTextReader reader)
en NHibernate.Cfg.Configuration.Configure(String fileName)
en BlockNotas_3.GNsis.Bd.NH_Manejador..ctor()
en BlockNotas_3.Nota_Lista_Form.Nota_Lista_Form_Load(Object sender, EventArgs e)
en System.EventHandler.Invoke(Object sender, EventArgs e)
en System.Windows.Forms.Form.OnLoad(EventArgs e)
en System.Windows.Forms.Form.OnCreateControl()
en System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
en System.Windows.Forms.Control.CreateControl()
en System.Windows.Forms.Control.WmShowWindow(Message& m)
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
en System.Windows.Forms.ContainerControl.WndProc(Message& m)
en System.Windows.Forms.Form.WmShowWindow(Message& m)
en System.Windows.Forms.Form.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Name and version of the database you are using:
MySQL 5
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html