Why it might happen, that a SQLite database file gets locked?
568 views
Skip to first unread message
Darius Damalakas
unread,
Jul 16, 2009, 9:22:43 AM7/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
I have upgraded to NH 2.1.x, and now the tests running on SQLite
database now fail with this exception:
----> System.Reflection.TargetInvocationException : Exception has been
thrown by the target of an invocation.
----> NHibernate.TransactionException : Begin failed with SQL
exception
----> System.Data.SQLite.SQLiteException : The database file is
locked
database is locked
--SQLiteException
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
at System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection
connection, Boolean deferredLock)
at System.Data.SQLite.SQLiteConnection.BeginTransaction(Boolean
deferredLock)
at System.Data.SQLite.SQLiteConnection.BeginDbTransaction
(IsolationLevel isolationLevel)
at
System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction
()
at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel
isolationLevel)
Any ideas why it was working before and now does not?
Fredy Treboux
unread,
Jul 17, 2009, 11:25:46 AM7/17/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhu...@googlegroups.com
How about providing the test?
J M
unread,
Jul 17, 2009, 12:40:42 PM7/17/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
SchemaUpdate is not supported by SQLite. You'll have to move to
another database type that does support it if you really need it.
I can't find a complete list of which databases support SchemaUpdate,
but I know at least SQL Server does.
J M
unread,
Jul 17, 2009, 1:09:37 PM7/17/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
Sorry, ignore that. Wrong thread.
Nelson Cabral
unread,
Sep 11, 2009, 6:22:30 PM9/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
To make it clear : SchemaUpdate works with SQLite. The SQLite file
lock problem is due to multithreaded access to an SQLite db (file).