-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: embedded firebird
PostPosted: Wed Jan 25, 2006 1:09 pm 
Regular
Regular

Joined: Tue May 24, 2005 12:55 pm
Posts: 56
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()


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 1:24 pm 
Newbie

Joined: Wed Jan 25, 2006 3:09 am
Posts: 10
this is what I used;

Code:
<add
   key="hibernate.dialect"                     
   value="NHibernate.Dialect.FirebirdDialect"
/>
<add
   key="hibernate.connection.driver_class"         
   value="NHibernate.Driver.FirebirdDriver"
/>
<add
   key="hibernate.connection.connection_string"
   value="User=sysdba;Password=masterkey;Database=DCD.FDB;Dialect=3;ServerType=1;"
/>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 4:19 pm 
Regular
Regular

Joined: Tue May 24, 2005 12:55 pm
Posts: 56
what dlls did you use and where did you put them?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 6:50 pm 
Regular
Regular

Joined: Tue May 24, 2005 12:55 pm
Posts: 56
Doh!

I didn't realize that ActiveRecord uses a .NET 1.1 NHibernate assembly. I was trying to use a 2.0 version of the Firebird provider.

Now I get a weird error about NH not creating a connection.
Code:
Could not create the schema
   at Castle.ActiveRecord.ActiveRecordStarter.CreateSchema()
   at AccessDev.ProjectMgmt.Model.AR.Tests.AbstractModelTestCase.PrepareSchema() in E:\My Projects\AccessDev\ProjectMgmt\AccessDev.ProjectMgmt.Model.AR.Tests\AbstractModelTestCase.cs:line 110
The user must provide an ADO.NET connection - NHibernate is not creating it.
   at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format)
   at NHibernate.Tool.hbm2ddl.SchemaExport.Create(Boolean script, Boolean export)
   at Castle.ActiveRecord.ActiveRecordStarter.CreateSchema()
The user must provide an ADO.NET connection - NHibernate is not creating it.
   at NHibernate.Connection.UserSuppliedConnectionProvider.GetConnection()
   at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.