[Mono-dev] System.Data.SQLite under mono

Miguel de Icaza miguel at novell.com
Tue May 12 11:08:51 EDT 2009


Hello,

> I'm trying to get phxsoftware's System.Data.SQLite managed-only dll
> working under mono. The readme claims i should just need the binary in
> the same directory and it works for mono. It does work for windows, i
> just drop sqlite3.dll in the dir and it works. However, i try the same
> with sqlite3.so and i get the following on opening the connection:

That is the way things work on Windows.

On Linux instead the sqlite3.so file must be in the LD_LIBRARY_PATH.

In general to debug EntryPointNotFound exceptions on Linux, you want  
to use the process described on the man page and set MONO_LOG_LEVEL to  
the proper value.

Miguel.

>
>
> Unhandled Exception: System.EntryPointNotFoundException:
> sqlite3_next_stmt
>   at (wrapper managed-to-native)
> System.Data.SQLite.UnsafeNativeMethods:sqlite3_next_stmt  
> (intptr,intptr)
>   at System.Data.SQLite.SQLiteBase.ResetConnection
> (System.Data.SQLite.SQLiteConnectionHandle db) [0x00000]
>   at System.Data.SQLite.SQLiteBase.CloseConnection
> (System.Data.SQLite.SQLiteConnectionHandle db) [0x00000]
>   at System.Data.SQLite.SQLiteConnectionHandle.ReleaseHandle ()
> [0x00000]
>   at System.Runtime.InteropServices.CriticalHandle.Dispose (Boolean
> disposing) [0x00000]
>   at System.Runtime.InteropServices.CriticalHandle.Dispose ()  
> [0x00000]
>   at System.Data.SQLite.SQLite3.Close () [0x00000]
>   at System.Data.SQLite.SQLiteConnection.Close () [0x00000]
>   at System.Data.SQLite.SQLiteConnection.Open () [0x00000]
>   at SqliteMixedTest.Program.Main (System.String[ args) [0x00000]
>
> Same result if i try to rename to .so to .dll or use <dllmap> in the
> config. True whether i use the binary for sqlite-3.8.14 or build it
> from source. I tried this a while back with mono 1.9.1 and now i'm
> trying it with 2.4. Any suggestions?
>
> The reason i'm not using Mono.Data.Sqlite is that i do my dev and
> initial unit testing in Visual Studio and am using fluent nhibernate
> (built against System.Data.Sqlite) and then deploy to linux. If there
> is a way to get this scenario working with Mono.Data.Sqlite, i'm open
> to that option as well.
>
> cheers,
> Arne Claassen
>
> MindTouch
> San Diego, CA
> http://twitter.com/sdether
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list