You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using quartz plugin version 2.0.12 and Grails 3.2.11 and I am wanting to create the required quartz tables in the bootstrap init with jdbcStore = true in the quartz config. I need to find a way to do this so when I clone an amazon instances of my application in AWS I don't have to manually create the quartz tables every time I clone the instance. The problem I am having is the the quartz plugin is initializing and trying to read from the QRTZ_JOB_DETAILS table before the table is even created in my bootstrap so the application fails to run with the following stacktrace:
`[02/07/2018 15:49:21] ERROR : org.springframework.boot.SpringApplication : Application startup failed
org.quartz.JobPersistenceException: Couldn't obtain job names: Table "QRTZ_JOB_DETAILS" not found; SQL statement:
SELECT JOB_NAME, JOB_GROUP FROM QRTZ_JOB_DETAILS WHERE SCHED_NAME = 'quartzScheduler' AND JOB_GROUP LIKE ? [42102-194]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getJobNames(JobStoreSupport.java:1889)
...
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getJobNames(JobStoreSupport.java:1887)
... 35 more
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':bootRun'.`
My bootstrap looks like this:
`
class BootStrap {
def dataSource
def init = { servletContext ->
def queries = []
queries.add("CREATE TABLE if not exists qrtz_job_details ( " +
"SCHED_NAME VARCHAR(120) NOT NULL," +
"JOB_NAME VARCHAR(200) NOT NULL," +
"JOB_GROUP VARCHAR(200) NOT NULL," +
"DESCRIPTION VARCHAR(250) NULL," +
"JOB_CLASS_NAME VARCHAR(250) NOT NULL," +
"IS_DURABLE BOOLEAN NOT NULL," +
"IS_NONCONCURRENT BOOLEAN NOT NULL," +
"IS_UPDATE_DATA BOOLEAN NOT NULL," +
"REQUESTS_RECOVERY BOOLEAN NOT NULL," +
"JOB_DATA BINARY NULL," +
"PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)" +
");")
Sql sql = new Sql(dataSource)
queries.each { query ->
sql.execute(query)
}
sql.close()
}
}
`
Is there a way to automatically generate the quartz tables in any way without manual intervention?
The text was updated successfully, but these errors were encountered:
I am using quartz plugin version 2.0.12 and Grails 3.2.11 and I am wanting to create the required quartz tables in the bootstrap init with jdbcStore = true in the quartz config. I need to find a way to do this so when I clone an amazon instances of my application in AWS I don't have to manually create the quartz tables every time I clone the instance. The problem I am having is the the quartz plugin is initializing and trying to read from the QRTZ_JOB_DETAILS table before the table is even created in my bootstrap so the application fails to run with the following stacktrace:
`[02/07/2018 15:49:21] ERROR : org.springframework.boot.SpringApplication : Application startup failed
org.quartz.JobPersistenceException: Couldn't obtain job names: Table "QRTZ_JOB_DETAILS" not found; SQL statement:
SELECT JOB_NAME, JOB_GROUP FROM QRTZ_JOB_DETAILS WHERE SCHED_NAME = 'quartzScheduler' AND JOB_GROUP LIKE ? [42102-194]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getJobNames(JobStoreSupport.java:1889)
...
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getJobNames(JobStoreSupport.java:1887)
... 35 more
FAILURE: Build failed with an exception.
Execution failed for task ':bootRun'.`
My bootstrap looks like this:
`
class BootStrap {
def dataSource
def init = { servletContext ->
}
}
`
Is there a way to automatically generate the quartz tables in any way without manual intervention?
The text was updated successfully, but these errors were encountered: