home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="morpheus_xx" data-source="post: 1037582" data-attributes="member: 48495"><p>I created a test installer, using SQLite as default DB. I found some issues:</p><ol> <li data-xf-list-type="ol">IRC bot fails to compile SQLite plugin due to missing dependencies. Local there was a missing reference and NuGet prompted to restore missing packages. After this action, references were ok. Build log is attached.</li> <li data-xf-list-type="ol">After manually adding SQLite to installed folder and restarting the computer, I found this error in log:</li> </ol><p>[CODE][2013-11-01 17:10:22,169] [61127 ] [Main ] [ERROR] - SettingsManager: Error loading settings of type 'SQLiteSettings'</p><p>System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Aufruf wurde durch Messagefilter abgebrochen. (Exception from HRESULT: 0x80010002 (RPC_E_CALL_CANCELED))</p><p> at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)</p><p> at System.Management.ManagementScope.InitializeGuts(Object o)</p><p> at System.Management.ManagementScope.Initialize()</p><p> at System.Management.ManagementObjectSearcher.Initialize()</p><p> at System.Management.ManagementObjectSearcher.Get()</p><p> at MediaPortal.Database.SQLite.SQLiteSettings.GetRamInMegaBytes()</p><p> at MediaPortal.Database.SQLite.SQLiteSettings..ctor()</p><p> --- End of inner exception stack trace ---</p><p> at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)</p><p> at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)</p><p> at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)</p><p> at System.Activator.CreateInstance(Type type, Boolean nonPublic)</p><p> at MediaPortal.Common.Services.Settings.SettingsManager.LoadSettingsObject(Type settingsType)</p><p>[2013-11-01 17:10:22,181] [61139 ] [Main ] [FATAL] - SQLiteDatabase: Error establishing database connection</p><p>System.NullReferenceException: Object reference not set to an instance of an object.</p><p> at MediaPortal.Database.SQLite.SQLiteDatabase..ctor()</p><p>[2013-11-01 17:10:22,182] [61140 ] [Main ] [ERROR] - PluginManager: Error building plugin item 'SQLiteDatabase' at location '/Services'</p><p>System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.</p><p> at MediaPortal.Database.SQLite.SQLiteDatabase..ctor()</p><p> --- End of inner exception stack trace ---</p><p> at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)</p><p> at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)</p><p> at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)</p><p> at System.Activator.CreateInstance(Type type, Boolean nonPublic)</p><p> at MediaPortal.Common.PluginManager.PluginRuntime.InstantiatePluginObject(String typeName)</p><p> at MediaPortal.Common.Services.PluginManager.Builders.ServiceBuilder.BuildItem(PluginItemMetadata itemData, PluginRuntime plugin)</p><p> at MediaPortal.Common.Services.PluginManager.PluginManager.RequestItem(PluginItemRegistration itemRegistration, Type type, IPluginItemStateTracker stateTracker)</p><p></p><p>[/CODE]</p><p><u>Edit:</u></p><p></p><p>the exception occured after reboot / autostart of server. In the 2nd attempt (manual start of server) it worked ok:</p><p>[CODE][2013-11-01 17:33:29,577] [744 ] [Main ] [INFO ] - SQLiteDatabase: Database Filename: 'Datastore.s3db' (Default Database Filename: 'Datastore.s3db')</p><p>[2013-11-01 17:33:29,578] [745 ] [Main ] [INFO ] - SQLiteDatabase: PageSize: 4096 Bytes (Default PageSize: 4096 Bytes)</p><p>[2013-11-01 17:33:29,635] [802 ] [Main ] [INFO ] - SQLiteDatabase: CacheSize: 65536 pages = 262144KB (RAM: 4094MB, Default CacheSize: 262144KB)</p><p>[2013-11-01 17:33:29,635] [802 ] [Main ] [INFO ] - SQLiteDatabase: LockTimeout: 30000ms (Default LockTimeout: 30000ms)</p><p>[2013-11-01 17:33:29,636] [803 ] [Main ] [INFO ] - SQLiteDatabase: Initialization Command: 'PRAGMA locking_mode=EXCLUSIVE;PRAGMA wal_autocheckpoint=32768;PRAGMA temp_store=MEMORY;' (Default Initialization Command: 'PRAGMA locking_mode=EXCLUSIVE;PRAGMA wal_autocheckpoint=32768;PRAGMA temp_store=MEMORY;')</p><p>[2013-11-01 17:33:29,653] [820 ] [Main ] [DEBUG] - SQLiteDatabase: URI used in connection string: 'file:///C:/ProgramData/Team%20MediaPortal/MP2-Server/Datastore.s3db?cache=shared'</p><p>[2013-11-01 17:33:29,691] [858 ] [Main ] [INFO ] - SQLiteDatabase: Connection String used: 'fulluri="file:///C:/ProgramData/Team%20MediaPortal/MP2-Server/Datastore.s3db?cache=shared";version=3;binaryguid=True;default timeout=30000;cache size=65536;journal mode=Wal;pooling=False;synchronous=Normal;foreign keys=True'</p><p>[2013-11-01 17:33:30,607] [1774 ] [Main ] [DEBUG] - SQLiteDatabase: 1 connections in use</p><p>[/CODE]</p><p></p><p><u>Edit 2:</u></p><p>I think the Management query tried to access informations that were not yet ready on service startup time. I found another way to query available RAM:</p><p><a href="http://www.dotnetspider.com/resources/4612-Find-Memory-usage-CPU-usage.aspx" target="_blank">http://www.dotnetspider.com/resources/4612-Find-Memory-usage-CPU-usage.aspx</a></p></blockquote><p></p>
[QUOTE="morpheus_xx, post: 1037582, member: 48495"] I created a test installer, using SQLite as default DB. I found some issues: [LIST=1] [*]IRC bot fails to compile SQLite plugin due to missing dependencies. Local there was a missing reference and NuGet prompted to restore missing packages. After this action, references were ok. Build log is attached. [*]After manually adding SQLite to installed folder and restarting the computer, I found this error in log: [/LIST] [CODE][2013-11-01 17:10:22,169] [61127 ] [Main ] [ERROR] - SettingsManager: Error loading settings of type 'SQLiteSettings' System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Aufruf wurde durch Messagefilter abgebrochen. (Exception from HRESULT: 0x80010002 (RPC_E_CALL_CANCELED)) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Management.ManagementScope.InitializeGuts(Object o) at System.Management.ManagementScope.Initialize() at System.Management.ManagementObjectSearcher.Initialize() at System.Management.ManagementObjectSearcher.Get() at MediaPortal.Database.SQLite.SQLiteSettings.GetRamInMegaBytes() at MediaPortal.Database.SQLite.SQLiteSettings..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at MediaPortal.Common.Services.Settings.SettingsManager.LoadSettingsObject(Type settingsType) [2013-11-01 17:10:22,181] [61139 ] [Main ] [FATAL] - SQLiteDatabase: Error establishing database connection System.NullReferenceException: Object reference not set to an instance of an object. at MediaPortal.Database.SQLite.SQLiteDatabase..ctor() [2013-11-01 17:10:22,182] [61140 ] [Main ] [ERROR] - PluginManager: Error building plugin item 'SQLiteDatabase' at location '/Services' System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at MediaPortal.Database.SQLite.SQLiteDatabase..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at MediaPortal.Common.PluginManager.PluginRuntime.InstantiatePluginObject(String typeName) at MediaPortal.Common.Services.PluginManager.Builders.ServiceBuilder.BuildItem(PluginItemMetadata itemData, PluginRuntime plugin) at MediaPortal.Common.Services.PluginManager.PluginManager.RequestItem(PluginItemRegistration itemRegistration, Type type, IPluginItemStateTracker stateTracker) [/CODE] [U]Edit:[/U] the exception occured after reboot / autostart of server. In the 2nd attempt (manual start of server) it worked ok: [CODE][2013-11-01 17:33:29,577] [744 ] [Main ] [INFO ] - SQLiteDatabase: Database Filename: 'Datastore.s3db' (Default Database Filename: 'Datastore.s3db') [2013-11-01 17:33:29,578] [745 ] [Main ] [INFO ] - SQLiteDatabase: PageSize: 4096 Bytes (Default PageSize: 4096 Bytes) [2013-11-01 17:33:29,635] [802 ] [Main ] [INFO ] - SQLiteDatabase: CacheSize: 65536 pages = 262144KB (RAM: 4094MB, Default CacheSize: 262144KB) [2013-11-01 17:33:29,635] [802 ] [Main ] [INFO ] - SQLiteDatabase: LockTimeout: 30000ms (Default LockTimeout: 30000ms) [2013-11-01 17:33:29,636] [803 ] [Main ] [INFO ] - SQLiteDatabase: Initialization Command: 'PRAGMA locking_mode=EXCLUSIVE;PRAGMA wal_autocheckpoint=32768;PRAGMA temp_store=MEMORY;' (Default Initialization Command: 'PRAGMA locking_mode=EXCLUSIVE;PRAGMA wal_autocheckpoint=32768;PRAGMA temp_store=MEMORY;') [2013-11-01 17:33:29,653] [820 ] [Main ] [DEBUG] - SQLiteDatabase: URI used in connection string: 'file:///C:/ProgramData/Team%20MediaPortal/MP2-Server/Datastore.s3db?cache=shared' [2013-11-01 17:33:29,691] [858 ] [Main ] [INFO ] - SQLiteDatabase: Connection String used: 'fulluri="file:///C:/ProgramData/Team%20MediaPortal/MP2-Server/Datastore.s3db?cache=shared";version=3;binaryguid=True;default timeout=30000;cache size=65536;journal mode=Wal;pooling=False;synchronous=Normal;foreign keys=True' [2013-11-01 17:33:30,607] [1774 ] [Main ] [DEBUG] - SQLiteDatabase: 1 connections in use [/CODE] [U]Edit 2:[/U] I think the Management query tried to access informations that were not yet ready on service startup time. I found another way to query available RAM: [url]http://www.dotnetspider.com/resources/4612-Find-Memory-usage-CPU-usage.aspx[/url] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
Top
Bottom