I'm guessing that the "AR Setting" is the appconfig.xml referenced in
the "Getting Started" guide.  Mine looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<appconfig>
        <config>
            <add key="connection.driver_class"
value="NHibernate.Driver.MySqlDataDriver" />
            <add key="dialect" value="NHibernate.Dialect.MySQL5Dialect"/>
            <add key="connection.provider"
value="NHibernate.Connection.DriverConnectionProvider" />
            <add key="connection.connection_string"
value="Server=lambda;Database=learncastle;User
Id=chris;Password=chris" />
            <add key="proxyfactory.factory_class"
value="NHibernate.ByteCode.Castle.ProxyFactoryFactory,
NHibernate.ByteCode.Castle" />
        </config>
</appconfig>

I have installed the MySQL/NET connector (6.0.4), and I have verified
that I can connect to the MySQL database via the command line.

The "proxyfactory" entry in the configuration is a new entry that I
thought I needed based on
http://justinram.wordpress.com/2009/01/23/castle-activerecord-exception-the-proxyfactoryfactory-was-not-configured/
, and if I add that, I no longer get the ProxyFactoryNotConfigured
exception :)

It has been replaced by:

NHibernate.HibernateException: Could not create the driver from
NHibernate.Driver.MySqlDataDriver. --->
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> NHibernate.HibernateException:
The IDbCommand and IDbConnection implementation in the assembly
MySql.Data could not be found. Ensure that the assembly MySql.Data is
located in the application directory or in the Global Assembly Cache.
If the assembly is in the GAC, use <qualifyAssembly/> element in the
application configuration file to specify the full name of the
assembly.
   at NHibernate.Connection.ConnectionProvider.ConfigureDriver
   at NHibernate.Connection.ConnectionProvider.Configure
   at
NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider
   at NHibernate.Cfg.SettingsFactory.BuildSettings
   at NHibernate.Cfg.Configuration.BuildSettings
   at NHibernate.Cfg.Configuration.BuildSessionFactory
   at
Castle.ActiveRecord.Framework.SessionFactoryHolder.GetSessionFactory
in c:\daten\dev\External\Castle\AR2.0\ActiveRecord\Castle.ActiveRecord
\Framework\SessionFactoryHolder.cs:line 131
   at Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateSession
in c:\daten\dev\External\Castle\AR2.0\ActiveRecord\Castle.ActiveRecord
\Framework\SessionFactoryHolder.cs:line 187
   at Castle.ActiveRecord.ActiveRecordBase.InternalCreate in c:\daten
\dev\External\Castle\AR2.0\ActiveRecord\Castle.ActiveRecord\Framework
\ActiveRecordBase.cs:line 123
   at Castle.ActiveRecord.ActiveRecordBase.Create in c:\daten\dev
\External\Castle\AR2.0\ActiveRecord\Castle.ActiveRecord\Framework
\ActiveRecordBase.cs:line 1475
   at LearnCastle.Program.Main in c:\Users\chris\Documents
\SharpDevelop Projects\LearnCastle\LearnCastle\Program.cs:line 44

I have added all the assemblies that I downloaded with MySQL/NET
connector (MySQL.Data, MySQL.Data.CF, MySQL.Data.Entity, MySQL.Web),
but I'm still getting the exception.

Any thoughts?

-Chris

P.S.  I'm still getting the message about SessionFactoryHolder.cs



On Aug 28, 6:48 pm, Chris Curvey <ccur...@gmail.com> wrote:
> What's an AR setting?  Where would I find it?  (Sorry, definite newbie
> here)
>
> On Aug 28, 6:26 pm, Tuna Toksoz <tehl...@gmail.com> wrote:
>
> > What is your AR setting?
>
> > Tuna Toksöz
> > Eternal sunshine of the open source mind.
>
> >http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitt...
>
> > On Sat, Aug 29, 2009 at 1:22 AM, Chris Curvey <ccur...@gmail.com> wrote:
>
> > > I'm taking Castle Active Record for a test drive, and I'm running into
> > > a little problem while working through the Getting Started
> > > instructions.
>
> > > I'm trying to install the correct assemblies (as per the
> > > "requirements" page), so I downloaded ActiveRecord2.0.zip, but there
> > > is no file called Castle.DynamicProxy.dll.   There is a
> > > LinFu.DynamicProxy and a Castle.DynamicProxy2, so I grabbed both of
> > > those.
>
> > > When I build my project, I get an error:
>
> > > =======
> > > Can't load file SessionFactoryHolder.cs under c:\daten\dev\External
> > > \Castle\AR2.0\ActiveRecord\Castle.ActiveRecord\Framework.
> > > Check the file permission and the existence of that file.
> > > ========
>
> > > so it looks like something has been hard-coded because I don't have a
> > > directory called c:\daten
>
> > > If I continue with the program (which is probably a bad idea and
> > > everything beyond here is irrelevant), I get an unhandled exception:
>
> > > =====
> > > NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException: An
> > > exception occurred in the persistence layer.
> > >   at
> > > NHibernate.Bytecode.AbstractBytecodeProvider.get_ProxyFactoryFactory
> > >   at NHibernate.Cfg.Configuration.Validate
> > >   at NHibernate.Cfg.Configuration.BuildSessionFactory
> > >   at
> > > Castle.ActiveRecord.Framework.SessionFactoryHolder.GetSessionFactory
> > > in c:\daten\dev\External\Castle\AR2.0\ActiveRecord\Castle.ActiveRecord
> > > \Framework\SessionFactoryHolder.cs:line 131
> > >   at Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateSession
> > > in c:\daten\dev\External\Castle\AR2.0\ActiveRecord\Castle.ActiveRecord
> > > \Framework\SessionFactoryHolder.cs:line 187
> > >   at Castle.ActiveRecord.ActiveRecordBase.InternalCreate in c:\daten
> > > \dev\External\Castle\AR2.0\ActiveRecord\Castle.ActiveRecord\Framework
> > > \ActiveRecordBase.cs:line 123
> > >   at Castle.ActiveRecord.ActiveRecordBase.Create in c:\daten\dev
> > > \External\Castle\AR2.0\ActiveRecord\Castle.ActiveRecord\Framework
> > > \ActiveRecordBase.cs:line 1475
> > >   at LearnCastle.Program.Main in c:\Users\chris\Documents
> > > \SharpDevelop Projects\LearnCastle\LearnCastle\Program.cs:line 32
> > > =====
>
> > > Any thoughts?  Perhaps this is something that's fixed in the source
> > > tree and I need to grab that?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to castle-project-users@googlegroups.com
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to