<activerecord isWeb="false"
                pluralizeTableNames="true">
    <config>
      <add key="connection.driver_class"
value="NHibernate.Driver.SqlClientDriver"/>
      <add key="dialect" value="NHibernate.Dialect.MsSql2005Dialect"/>
      <add key="connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"/>
      <add key="connection.connection_string" value="Initial
Catalog=phoenix;Server=localhost\SQLEXPRESS;persist security
info=False;integrated security=SSPI;Trusted_Connection=yes"/>
    </config>
  </activerecord>

On Oct 3, 9:33 am, "Tim TSH" <[EMAIL PROTECTED]> wrote:
> can you post your activerecord configuration file content ?
>
> 2008/10/3 Brian Meeker <[EMAIL PROTECTED]>
>
>
>
> > For a new project I am trying to avoid the .dll versioning issues my
> > team has had in the past by putting our core assemblies in the GAC.
> > When trying to initialize ActiveRecord with an assembly in the GAC I
> > get an error though. Below is the code used to initialize
> > ActiveRecord. I have also tried loading the assembly with the fully
> > qualified name with the same results. Has anybody else had success
> > initializing from an assembly in the GAC?
>
> > The very inner exception in the stack trace below is a
> > FileNotFoundException which is leading me to believe that NHibernate
> > is not getting the fully qualified name from Castle.
>
> > IConfigurationSource source =
> > ConfigurationManager.GetSection("activerecord") as
> > IConfigurationSource;
> > Assembly assembly = Assembly.GetExecutingAssembly();
> > ActiveRecordStarter.Initialize(assembly, source);
>
> > CaseTests : Castle.ActiveRecord.Framework.ActiveRecordException :
> > Error adding information from class
> > Lsr.Phoenix.Model.Export.ExportedEvent to NHibernate. Check the inner
> > exception for more information
> >  ----> NHibernate.MappingException : Could not compile the mapping
> > document: (string)
> >  ----> NHibernate.MappingException : persistent class
> > Lsr.Phoenix.Model.Export.ExportedEvent, Lsr.Phoenix.Model not found
> >  ----> System.IO.FileNotFoundException : Could not load file or
> > assembly 'Lsr.Phoenix.Model' or one of its dependencies. The system
> > cannot find the file specified.
> > at Castle.ActiveRecord.ActiveRecordStarter.AddXmlString(Configuration
> > config, String xml, ActiveRecordModel model)
> > at
>
> > Castle.ActiveRecord.ActiveRecordStarter.AddXmlToNHibernateCfg(ISessionFactoryHolder
> > holder, ActiveRecordModelCollection models)
> > at
> > Castle.ActiveRecord.ActiveRecordStarter.RegisterTypes(ISessionFactoryHolder
> > holder, IConfigurationSource source, IEnumerable`1 types, Boolean
> > ignoreProblematicTypes)
> > at
> > Castle.ActiveRecord.ActiveRecordStarter.Initialize(IConfigurationSource
> > source, Type[] types)
> > at Castle.ActiveRecord.ActiveRecordStarter.Initialize(Assembly
> > assembly, IConfigurationSource source)
> > at Lsr.Phoenix.Model.Util.ActiveRecordInitializer.InitFromAppDomain()
> > at Lsr.Phoenix.Tests.DatabaseTestFixtureBase.TestFixtureSetup()
> > at Lsr.Phoenix.Model.Test.CaseTests.TestFixtureSetup() in c:\Builds
> > \Phoenix\Source\Tests\Lsr.Phoenix.Model\CaseTests.cs:line 18
> > --MappingException
> > 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
> > document)
> > at NHibernate.Cfg.Configuration.AddXmlReader(XmlReader hbmReader,
> > String name)
> > at NHibernate.Cfg.Configuration.AddXml(String xml, String name)
> > at NHibernate.Cfg.Configuration.AddXml(String xml)
> > at NHibernate.Cfg.Configuration.AddXmlString(String xml)
> > at Castle.ActiveRecord.ActiveRecordStarter.AddXmlString(Configuration
> > config, String xml, ActiveRecordModel model)
> > --MappingException
> > at NHibernate.Cfg.XmlHbmBinding.Binder.ClassForFullNameChecked(String
> > fullName, String errorMessage)
> > at NHibernate.Cfg.XmlHbmBinding.Binder.ClassForNameChecked(String
> > name, Mappings mappings, String errorMessage)
> > at NHibernate.Cfg.XmlHbmBinding.ClassBinder.BindClass(XmlNode node,
> > PersistentClass model)
> > at NHibernate.Cfg.XmlHbmBinding.RootClassBinder.Bind(XmlNode node,
> > HbmClass classSchema)
> > at
> > NHibernate.Cfg.XmlHbmBinding.MappingRootBinder.AddRootClasses(XmlNode
> > parentNode)
> > at NHibernate.Cfg.XmlHbmBinding.MappingRootBinder.Bind(XmlNode node)
> > at NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument
> > doc)
> > --FileNotFoundException
> > at System.Reflection.Assembly._nLoad(AssemblyName fileName, String
> > codeBase, Evidence assemblySecurity, Assembly locationHint,
> > StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
> > forIntrospection)
> > at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
> > codeBase, Evidence assemblySecurity, Assembly locationHint,
> > StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
> > forIntrospection)
> > at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
> > Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
> > forIntrospection)
> > at System.Reflection.Assembly.InternalLoad(String assemblyString,
> > Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
> > forIntrospection)
> > at System.Reflection.Assembly.Load(String assemblyString)
> > at
> > NHibernate.Util.ReflectHelper.TypeFromAssembly(AssemblyQualifiedTypeName
> > name, Boolean throwOnError)
> > at NHibernate.Util.ReflectHelper.ClassForName(String name)
> > at NHibernate.Cfg.XmlHbmBinding.Binder.ClassForFullNameChecked(String
> > fullName, String errorMessage)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to