Nimer Awad
Nimer Awad

Reputation: 4199

Why i can't initialize quartz.net adoJobStore with oracle?

I'm trying to setup quartz.net AdoJobStore with oracle. I have a valid schema with tables for quartz. But every time i'm facing the same Exception "Could not Initialize DataSource: default" at the last line of this code.

        NameValueCollection properties = new NameValueCollection();
        properties["quartz.scheduler.instanceName"] = "TestScheduler";
        properties["quartz.scheduler.instanceId"] = "instance_one";
        properties["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
        properties["quartz.jobStore.useProperties"] = "true";
        properties["quartz.jobStore.dataSource"] = "default";
        properties["quartz.jobStore.tablePrefix"] = "QRTZ_";
        properties["quartz.dataSource.default.connectionString"] = "Data Source=//192.168.0.221:1521/ESPDB;User Id=quartz;Password=quartz";
        properties["quartz.dataSource.default.provider"] = "OracleODP-20";
        //
        ISchedulerFactory schedulerFactory = new StdSchedulerFactory(properties);
        IScheduler scheduler = await schedulerFactory.GetScheduler();

Same exception i was faced when i'm trying to use config file. I'm using version 3.0 of quartz.

Upvotes: 1

Views: 1129

Answers (1)

D. Pesc.
D. Pesc.

Reputation: 195

Try to modify last property as follows

properties["quartz.dataSource.default.provider"] = "OracleODP";

It worked for me. I think OracleODP-20 could be the old value of Oracle data provider for previous version of Quartz.net as you can read here.

Upvotes: 2

Related Questions