AdoJobStore with Sqlite

Finally, I was able to install ADOJobStorefor Sql Server, but I would also like it to work with Sqlite, and I'm still not ready to work it. This is part of mine quartz.configthat I set properties for mine ADOJobStore:

# to use the sqlite store, uncomment all of this 
quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz 
quartz.jobStore.dataSource = default 
quartz.dataSource.default.connectionString = Data Source=postbag-jobs.db;Version=3;Foreign Keys=ON;
quartz.jobStore.tablePrefix = QRTZ_ 
quartz.jobStore.clustered = false
quartz.jobStore.lockHandler.type = Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz 
quartz.jobStore.driverDelegateType = Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz 
quartz.dataSource.default.provider = SQLite-10 
quartz.jobStore.useProperties = true

I created the Sqlite database separately and placed it inside the working directory of my server. However, when the service is initialized, I get SchedulerExceptionthat that says:

Could not Initialize DataSource: default

With this InnerException:

Error while reading metadata information for provider 'SQLite-10'
Parameter name: providerName

Should I provide my Sqlite server .DLL? Because I did not need to do this for Sql Server.

+4
source share
1 answer

Sqlite Quartz.net, :

<add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" />
<add key="quartz.threadPool.threadCount" value="10" />
<add key="quartz.jobStore.type" value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" />
<add key="quartz.jobStore.misfireThreshold" value="60000" />
<add key="quartz.jobStore.lockHandler.type" value="Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz" />
<add key="quartz.jobStore.useProperties" value="true" />
<add key="quartz.jobStore.dataSource" value="default" />
<add key="quartz.jobStore.tablePrefix" value="qrtz_" />
<add key="quartz.jobStore.driverDelegateType" value="Quartz.Impl.AdoJobStore.SQLiteDelegate, Quartz" />
<add key="quartz.dataSource.default.provider" value="SQLite-10" />
<add key="quartz.dataSource.default.connectionString" value="Data Source=postbag-jobs.db;Version=3;" />

, DelegateType . SQLiteDelegate:

<add key="quartz.jobStore.driverDelegateType" value="Quartz.Impl.AdoJobStore.SQLiteDelegate, Quartz" />

ADO.NET (nuget):

Install-Package System.Data.SQLite.Core

, , - (1.0.94.0), - Quartz.Net( 1.0.88.0). .

, app.config:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
            <bindingRedirect oldVersion="1.0.88.0" newVersion="1.0.94.0" />
        </dependentAssembly>
    </assemblyBinding>
</runtime>

github.

+8

All Articles