'Quartz, setting up postgres schema, what should JOB_DATA be?
I'm using liquibase to setup the database tables for quartz as per Bert R recipe.
What is the correct type for the JOB_DATA columns for postgres?
The raw error is
Caused by: org.quartz.JobPersistenceException: Couldn't retrieve trigger: 2
at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1538)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
at org.postgresql.util.PGbytea.toBytes(PGbytea.java:76)
The base error is in PostgreSQlDelegate.java trying to read the JOB_DATA column from the qrtz_triggers table. This column does have just \x in it.
I have changed the above liquibase file to change the type from BLOB to BYTEA as I was getting an error
column "job_data" is of type oid but expression is of type bytea
The quartz properties file includes the following settings for the Job Store
# Job Store
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass =
org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
Solution 1:[1]
For those like me who struggled to find the quartz db creation schema, you can also find in the github repo under main/resources/org/quartz/impl/jdbcjobstore/.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jhon L |
