Problem: I have a console app with a class that uses nhibernate 1.2 GA which works fine. I use the class in a windows service and get this error on the first sql query: NHibernate.DuplicateMappingException.
Is there anything special I should be aware of when using NHibernate in a windows service? Thanks.
Full stack trace of any exception that occurs:
From event.log --
Service cannot be started. NHibernate.MappingException: Could not compile the mapping document: Pappas.Domain.Domain.SettlementHist.hbm.xml ---> NHibernate.DuplicateMappingException: Duplicate class/entity mapping SettlementOfflineHist
at NHibernate.Cfg.Mappings.AddClass(PersistentClass persistentClass)
at NHibernate.Cfg.HbmBinder.PropertiesFromXML(XmlNode node, PersistentClass model, Mappings mappings)
at NHibernate.Cfg.HbmBinder.BindRootClass(XmlNode node, RootClass model, Mappings mappings)
at NHibernate.Cfg.HbmBinder.BindRoot(XmlDocument doc, Mappings mappings)
at NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc, String name)
--- End of inner exception stack trace ---
at Pappas.Domain.NHDao`1.GetObject(String query)
at Pappas.BatchProcessor.GetConstants()
at Pappas.BatchProcessor..ctor()
at Pappas.BatchProccessorService.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
|