there are times when the exception nhibernate throws is not informative enough, like sometimes when an hql isn't ok, but i've never seen such an exception thrown when an hbm isn't ok, so i'm pretty sure there is an inner excepion out there.
in debug mode write ex.ToString() and read whats there. if you can't figure it out, reply here with the ex.ToString() value, which hopefully contains an inner exception On Fri, Aug 27, 2010 at 4:47 PM, PLen <[email protected]> wrote: > > Thanks for the reply. I don't understand what you mean though. The > message "Could not compile the mapping document: > FirstSample.Mappings.Tester.hbm.xml" is literally all that gets > displayed in the console. This is a Visual Studio Console > Application. Is there some other area in Visual Studio that would > list additional error info? The error is occuring on the line: > > > configuration.AddAssembly(typeof (Tester).Assembly); > > If I add that to a try/catch block and print the stack trace, it > prints: > > M ERROR: at NHibernate.Cfg.Configuration.LogAndThrow(Exception > exception) > at > NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument > doc) > at NHibernate.Cfg.Configuration.ProcessMappingsQueue() > at > NHibernate.Cfg.Configuration.AddDocumentThroughQueue(NamedXmlDocument > docu > ment) > at NHibernate.Cfg.Configuration.AddXmlReader(XmlReader hbmReader, > String name > ) > at NHibernate.Cfg.Configuration.AddInputStream(Stream > xmlInputStream, String > name) > at NHibernate.Cfg.Configuration.AddResource(String path, Assembly > assembly) > at NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly) > at FirstSample.Repositories.NHibernateHelper.get_SessionFactory() > in E:\visua > l_studio_projects\nHibernate2\FirstSample\Repositories > \NHibernateHelper.cs:line > 25 > > Line 25 of that file is the "configuration.AddAssembly(typeof > (Tester).Assembly);" entry. That doesn't seem to be of any help that > I can tell. > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
