I've read everything a search engine will get for me and I can't find any guidance for using NHibernate and embedded Firebird. Anyone using this combo? Currently I have the fbembed.dll in my bin and the following config:
Code:
<config>
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.FirebirdDriver" />
<add key="hibernate.dialect" value="NHibernate.Dialect.FirebirdDialect" />
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="hibernate.connection.connection_string" value="Server=.;Database=..\Data\PMTEST.FDB;ServerType=1;Pooling=false" />
<add key="hibernate.query.substitutions" value="true 1, false 0" />
</config>
I've tried Server=localhost as well as placing the DB in the bin but I always get this error:
Quote:
Could not create the driver from NHibernate.Driver.FirebirdDriver.
Yeah, I'm using activerecord. here is the full stack trace
Quote:
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)
at NHibernate.Connection.ConnectionProvider.Configure(IDictionary settings)
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary settings)
at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary properties)
at NHibernate.Cfg.Configuration.BuildSessionFactory()
at Castle.ActiveRecord.Framework.SessionFactoryHolder.GetSessionFactory(Type type)
at Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateScopeSession(Type type)
at Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateSession(Type type)
at Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id, Boolean throwOnNotFound)
at Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id)
at AccessDev.ProjectMgmt.Model.AR.User.Find(Int32 Id) in E:\My Projects\AccessDev\ProjectMgmt\AccessDev.ProjectMgmt.Model.AR\User.cs:line 163
at AccessDev.ProjectMgmt.Model.AR.Tests.UserTestFixture.SimpleTests() in E:\My Projects\AccessDev\ProjectMgmt\AccessDev.ProjectMgmt.Model.AR.Tests\UserTestFixture.cs:line 23
--HibernateException
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)
--TargetInvocationException
at NHibernate.Driver.FirebirdDriver..ctor()
--TearDown
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at NUnit.Core.TestMethod.doTearDown(TestCaseResult testResult)
--TargetInvocationException
at Castle.ActiveRecord.ActiveRecordStarter.DropSchema()
at AccessDev.ProjectMgmt.Model.AR.Tests.AbstractModelTestCase.DropSchema() in E:\My Projects\AccessDev\ProjectMgmt\AccessDev.ProjectMgmt.Model.AR.Tests\AbstractModelTestCase.cs:line 133
at AccessDev.ProjectMgmt.Model.AR.Tests.AbstractModelTestCase.Terminate() in E:\My Projects\AccessDev\ProjectMgmt\AccessDev.ProjectMgmt.Model.AR.Tests\AbstractModelTestCase.cs:line 75
--ActiveRecordException
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)
at NHibernate.Connection.ConnectionProvider.Configure(IDictionary settings)
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary settings)
at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format)
at NHibernate.Tool.hbm2ddl.SchemaExport.Drop(Boolean script, Boolean export)
at Castle.ActiveRecord.ActiveRecordStarter.DropSchema()
--HibernateException
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)
--TargetInvocationException
at NHibernate.Driver.FirebirdDriver..ctor()