-->
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.  [ 3 posts ] 
Author Message
 Post subject: SQLite problem
PostPosted: Thu Mar 22, 2007 7:40 am 
Beginner
Beginner

Joined: Wed Nov 22, 2006 5:59 am
Posts: 29
Location: London
Hi

I am trying to use an SQLite database in my solution and am having some trouble getting it working. I have the same mapping files working with SQL Server 2005 but when I try to use an SQLite database I get the following error

NHibernate.HibernateException: Unable to load DLL 'coredll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format) in c:\net\nhibernate\nhibernate\src\NHibernate\Tool\hbm2ddl\SchemaExport.cs:line 275
at NHibernate.Tool.hbm2ddl.SchemaExport.Create(Boolean script, Boolean export) in c:\net\nhibernate\nhibernate\src\NHibernate\Tool\hbm2ddl\SchemaExport.cs:line 87
at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionFactoryImpl.cs:line 262
at NHibernate.Cfg.Configuration.BuildSessionFactory() in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1063
at CCM.ProcessDesigner.Data.NHibernateHelper.SetUpSpecificData(XmlTextReader reader) in NHibernateHelper.cs:line 31
at CCM.ProcessDesigner.Data.Session..ctor(XmlTextReader reader) in Session.cs:line 26
at CCM.ProcessDesigner.Data.Tests.NHibernateTests.TestConnectToSeperateDataSourceSQLite() in NHibernateTests.cs:line 541

System.DllNotFoundException: Unable to load DLL 'coredll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

at Finisar.SQLite.Util.GetProcessHeap()
at Finisar.SQLite.Util.AllocateUnmanagedMemory(Int32 size)
at Finisar.SQLite.MarshalStr.GetSQLiteStr()
at Finisar.SQLite.sqlite3.open(String filename)
at Finisar.SQLite.SQLiteConnection.Open()
at NHibernate.Connection.DriverConnectionProvider.GetConnection() in c:\net\nhibernate\nhibernate\src\NHibernate\Connection\DriverConnectionProvider.cs:line 46
at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format) in c:\net\nhibernate\nhibernate\src\NHibernate\Tool\hbm2ddl\SchemaExport.cs:line 262

I am using the DLL I found at this site:
http://sourceforge.net/projects/adodotnetsqlite

Is this the correct way to use SQLite with nhibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 22, 2007 10:18 am 
Beginner
Beginner

Joined: Wed Nov 22, 2006 5:59 am
Posts: 29
Location: London
Ok I worked out I was using the wrong version!! So I have now downloaded what I hope is the correct one and I now get the following error. Has anyone else come accross this before?

Code:
NHibernate.HibernateException: Unable to load DLL 'sqlite': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format) in c:\net\nhibernate\nhibernate\src\NHibernate\Tool\hbm2ddl\SchemaExport.cs:line 275
at NHibernate.Tool.hbm2ddl.SchemaExport.Create(Boolean script, Boolean export) in c:\net\nhibernate\nhibernate\src\NHibernate\Tool\hbm2ddl\SchemaExport.cs:line 87
at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionFactoryImpl.cs:line 262
at NHibernate.Cfg.Configuration.BuildSessionFactory() in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1063
at CCM.ProcessDesigner.Data.NHibernateHelper.SetUpSpecificData(XmlTextReader reader) in NHibernateHelper.cs:line 31
at CCM.ProcessDesigner.Data.Session..ctor(XmlTextReader reader) in Session.cs:line 26
at CCM.ProcessDesigner.Data.Tests.NHibernateTests.TestConnectToSeperateDataSourceSQLite() in NHibernateTests.cs:line 542

System.DllNotFoundException: Unable to load DLL 'sqlite': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

at Finisar.SQLite.sqlite2.sqlite_open(IntPtr filename, Int32 mode, IntPtr& errmsg)
at Finisar.SQLite.sqlite2.open(String filename)
at Finisar.SQLite.SQLiteConnection.Open()
at NHibernate.Connection.DriverConnectionProvider.GetConnection() in c:\net\nhibernate\nhibernate\src\NHibernate\Connection\DriverConnectionProvider.cs:line 46
at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format) in c:\net\nhibernate\nhibernate\src\NHibernate\Tool\hbm2ddl\SchemaExport.cs:line 262


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 22, 2007 5:01 pm 
Newbie

Joined: Mon Mar 05, 2007 3:50 am
Posts: 6
Are you also using the correct version of the nhibernate driver?

Code:
properties.Add("hibernate.dialect", "NHibernate.Dialect.SQLiteDialect");
properties.Add("hibernate.connection.driver_class", "NHibernate.Driver.SQLite20Driver");


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.