Hi, I get an exception when trying to initialize ActiveRecord, and I cannot figure out what I am not seeing. I'm trying to convince the company I work with to use Castle ActiveRecord and it won’t look good if I can’t demonstrate how it works. I have worked on projects before with Castle ActiveRecord, and I have never experienced this problem before.
thanks for the help
The exception that I get is
Stack trace:
in Castle.ActiveRecord.ActiveRecordStarter.AddXmlString (Configuration config, String xml, model ActiveRecordModel) in Castle.ActiveRecord.ActiveRecordStarter.AddXmlToNHibernateCfg (owner ISessionFactoryHolder, ActiveRecordModelCollection model) in Castle.ActiveRecord.ActiveRecordStarter.RegisterTypes (owner ISessionFactoryHolder, source IConfigurationSource, types IEnumerable `1, logical ignoreProblematicTypes) in Castle.ActiveRecord.ActiveRecordStarter.Initialize (source IConfigurationSource, Type []) in ConsoleApplication1.Program.Main (String [] args) in C: \ Projects \ CastleDemo \ ConsoleApplication1 \ Program.cs: line 20 in System.AppDomain._nExecuteAssembly (assembly assembly, String [] args) in System.AppDomain.ExecuteAssembly (String assemblyFile, Evidence assemblySecurity, String [] args) in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly () in System.Threading.ThreadHelper.ThreadStart_Context (object state) in System.Threading.ExecutionContext.Run (ExecutionContext executeContext, ContextCallback callback, object state) in System.Threading.ThreadHelper.ThreadStart ()
:
{ " : (string)" }
:
<add
key="connection.driver_class"
value="NHibernate.Driver.SqlClientDriver" />
<add
key="dialect"
value="NHibernate.Dialect.MsSql2000Dialect" />
<add
key="connection.provider"
value="NHibernate.Connection.DriverConnectionProvider" />
<add
key="connection.connection_string"
value="Data Source=SPIROS\SQLX;Initial Catalog=CastleDemo;Integrated Security=SSPI" />
<add
key="proxyfactory.factory_class"
value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" />
, :
static void Main(string[] args)
{
XmlConfigurationSource source = new XmlConfigurationSource("../../config.xml");
ActiveRecordStarter.Initialize( source, typeof(Product));
ActiveRecordStarter.CreateSchema();
}