System.DllNotFoundException: System.Data.SQLite.dll

Bug reports and questions about running Virtual Radar Server on Linux
Post Reply
Polyphemus
Posts: 2
Joined: Sun Feb 26, 2017 6:45 pm

System.DllNotFoundException: System.Data.SQLite.dll

Post by Polyphemus » Sun Feb 26, 2017 6:50 pm

Hi!

I just built the latest VRS from the source from github, because I want to use a more recent version on my Raspberry Pi. Compilation on Visual Studio 2015 on my Windows 10 laptop went fine, but when I run VirtualRadar.exe with Mono on my RPi, I'm getting the following error:

Code: Select all

Unhandled Exception Caught
System.DllNotFoundException: System.Data.SQLite.dll
  at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_config_none (System.Data.SQLite.SQLiteConfigOpsEnum)
  at System.Data.SQLite.SQLite3.StaticIsInitialized () [0x0001c] in <a62d8818772e4b9a8cc7acff855047a5>:0
  at System.Data.SQLite.SQLiteLog.Initialize () [0x00000] in <a62d8818772e4b9a8cc7acff855047a5>:0
  at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString, System.Boolean parseViaFramework) [0x0001c] in <a62d8818772e4b9a8cc7acff855047a5>:0
  at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString) [0x00000] in <a62d8818772e4b9a8cc7acff855047a5>:0
  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteConnection:.ctor (string)
  at VirtualRadar.SQLiteWrapper.SQLiteConnectionProvider.Create (System.String connectionString) [0x00001] in <0ed252054d3d41b88b66047800692909>:0
  at VirtualRadar.Database.Users.Database.OpenConnection () [0x0007a] in <9e31928858b74e4d91d9f23ec9483779>:0
  at VirtualRadar.Database.Users.Database.UserGetManyByUniqueId (System.Collections.Generic.List`1[T] uniqueIdentifiers) [0x00014] in <9e31928858b74e4d91d9f23ec9483779>:0
  at VirtualRadar.Database.Users.UserManager.GetUsersByUniqueId (System.Collections.Generic.IEnumerable`1[T] uniqueIdentifiers) [0x00051] in <9e31928858b74e4d91d9f23ec9483779>:0
  at VirtualRadar.WebSite.WebSite.CacheUsers (System.Collections.Generic.Dictionary`2[TKey,TValue] cacheDictionary, System.Collections.Generic.IEnumerable`1[T] userIds) [0x00002] in <30eb983f50904f4581ad0035c7a7cd2f>:0
  at VirtualRadar.WebSite.WebSite.LoadConfiguration () [0x00055] in <30eb983f50904f4581ad0035c7a7cd2f>:0
  at VirtualRadar.WebSite.WebSite.AttachSiteToServer (VirtualRadar.Interface.WebServer.IWebServer server) [0x00239] in <30eb983f50904f4581ad0035c7a7cd2f>:0
  at VirtualRadar.Library.Presenter.SplashPresenter.StartWebSite () [0x000ea] in <d9b695c4d5df48ba83d546f89c0ea5e2>:0
  at VirtualRadar.Library.Presenter.SplashPresenter.StartApplication () [0x00072] in <d9b695c4d5df48ba83d546f89c0ea5e2>:0
  at VirtualRadar.Headless.View.SplashView.ShowView () [0x0002e] in <e81f5a36948649b594291e3027e1f426>:0
  at VirtualRadar.Interface.ProgramLifetime.StartApplication (System.String[] args) [0x0002c] in <e2b2c510c1204ccaa04be5daef48859e>:0
  at VirtualRadar.Interface.ProgramLifetime.SingleInstanceStart (System.String[] args) [0x00018] in <e2b2c510c1204ccaa04be5daef48859e>:0
  at VirtualRadar.Program.Main (System.String[] args) [0x0006e] in <31f91266b18a46dfbd8870bcc77a9570>:0

[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: System.Data.SQLite.dll
  at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_config_none (System.Data.SQLite.SQLiteConfigOpsEnum)
  at System.Data.SQLite.SQLite3.StaticIsInitialized () [0x0001c] in <a62d8818772e4b9a8cc7acff855047a5>:0
  at System.Data.SQLite.SQLiteLog.Initialize () [0x00000] in <a62d8818772e4b9a8cc7acff855047a5>:0
  at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString, System.Boolean parseViaFramework) [0x0001c] in <a62d8818772e4b9a8cc7acff855047a5>:0
  at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString) [0x00000] in <a62d8818772e4b9a8cc7acff855047a5>:0
  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteConnection:.ctor (string)
  at VirtualRadar.SQLiteWrapper.SQLiteConnectionProvider.Create (System.String connectionString) [0x00001] in <0ed252054d3d41b88b66047800692909>:0
  at VirtualRadar.Database.Users.Database.OpenConnection () [0x0007a] in <9e31928858b74e4d91d9f23ec9483779>:0
  at VirtualRadar.Database.Users.Database.UserGetManyByUniqueId (System.Collections.Generic.List`1[T] uniqueIdentifiers) [0x00014] in <9e31928858b74e4d91d9f23ec9483779>:0
  at VirtualRadar.Database.Users.UserManager.GetUsersByUniqueId (System.Collections.Generic.IEnumerable`1[T] uniqueIdentifiers) [0x00051] in <9e31928858b74e4d91d9f23ec9483779>:0
  at VirtualRadar.WebSite.WebSite.CacheUsers (System.Collections.Generic.Dictionary`2[TKey,TValue] cacheDictionary, System.Collections.Generic.IEnumerable`1[T] userIds) [0x00002] in <30eb983f50904f4581ad0035c7a7cd2f>:0
  at VirtualRadar.WebSite.WebSite.LoadConfiguration () [0x00055] in <30eb983f50904f4581ad0035c7a7cd2f>:0
  at VirtualRadar.WebSite.WebSite.AttachSiteToServer (VirtualRadar.Interface.WebServer.IWebServer server) [0x00239] in <30eb983f50904f4581ad0035c7a7cd2f>:0
  at VirtualRadar.Library.Presenter.SplashPresenter.StartWebSite () [0x000ea] in <d9b695c4d5df48ba83d546f89c0ea5e2>:0
  at VirtualRadar.Library.Presenter.SplashPresenter.StartApplication () [0x00072] in <d9b695c4d5df48ba83d546f89c0ea5e2>:0
  at VirtualRadar.Headless.View.SplashView.ShowView () [0x0002e] in <e81f5a36948649b594291e3027e1f426>:0
  at VirtualRadar.Interface.ProgramLifetime.StartApplication (System.String[] args) [0x0002c] in <e2b2c510c1204ccaa04be5daef48859e>:0
  at VirtualRadar.Interface.ProgramLifetime.SingleInstanceStart (System.String[] args) [0x00018] in <e2b2c510c1204ccaa04be5daef48859e>:0
  at VirtualRadar.Program.Main (System.String[] args) [0x0006e] in <31f91266b18a46dfbd8870bcc77a9570>:0
The System.Data.SQLite.dll is present in the same folder as the executable...

My Mono version is:

Mono JIT compiler version 4.6.2 (Stable 4.6.2.16/ac9e222 Tue Jan 3 12:12:14 UTC 2017)

What am I missing?

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: System.DllNotFoundException: System.Data.SQLite.dll

Post by agw » Sun Feb 26, 2017 7:40 pm

VRS uses a wrapper to access SQLite. In the source folder you should see two folders, one called SQLiteWrapper.DotNet and one called SQLiteWrapper.Mono. When you build under Visual Studio the .DotNet version is the one that's copied into the VirtualRadar build folder. If you do a straight copy of the build folder to your Pi then it'll fail when it tries to load the Windows ADO.Net wrapper.

You just need to manually copy the VirtualRadar.SQLiteWrapper.dll file out of the SQLiteWrapper.Mono build folder and overwrite the .DotNet version with it.

Polyphemus
Posts: 2
Joined: Sun Feb 26, 2017 6:45 pm

Re: System.DllNotFoundException: System.Data.SQLite.dll

Post by Polyphemus » Sun Feb 26, 2017 8:20 pm

Thanks! :D

Post Reply