java.io.InvalidClassException: oracle.iam.scheduler.vo.CronTrigger

Error:

 [oim_server1] [ERROR] [] [org.quartz.impl.jdbcjobstore.JobStoreCMT] [tid: QuartzScheduler_OIMQuartzScheduler-tslex010011443689497824_MisfireHandler] [userId: oiminternal] [ecid: 952a919c9c3f77f3:-1ca7c338:150229520fb:-8000-0000000000000003,1:20507] [APP: oim#11.1.2.0.0] MisfireHandler: Error handling misfires: Couldn't retrieve trigger: oracle.iam.scheduler.vo.CronTrigger; local class incompatible: stream classdesc serialVersionUID = -8260388144605252686, local class serialVersionUID = -1466949822132471878[[
org.quartz.JobPersistenceException: Couldn't retrieve trigger: oracle.iam.scheduler.vo.CronTrigger; local class incompatible: stream classdesc serialVersionUID = -8260388144605252686, local class serialVersionUID = -8260388144605252686[See nested exception: java.io.InvalidClassException: oracle.iam.scheduler.vo.CronTrigger; local class incompatible: stream classdesc serialVersionUID = -8260388144605252686, local class serialVersionUID = -1466949822132471878]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1508)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:891)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3029)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3789)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3809)
Caused by: java.io.InvalidClassException: oracle.iam.scheduler.vo.CronTrigger; local class incompatible: stream classdesc serialVersionUID = -8260388144605252686, local class serialVersionUID = -8260388144605252686




Solution :
Execute below SQL Block 

DROP TABLE QRTZ92_CRON_TRIGGERS_TEMP;
DROP TABLE QRTZ92_TRIGGERS_TEMP;

SET SERVEROUTPUT ON
DECLARE

VCRON_COUNT NUMBER :=0;
CTRIGER_COUNT NUMBER :=0;

CURSOR CRONJOBS_TO_DROP IS
SELECT TRIGGER_NAME FROM QRTZ92_CRON_TRIGGERS;
BEGIN

SELECT COUNT(1) INTO VCRON_COUNT FROM QRTZ92_CRON_TRIGGERS;
 DBMS_OUTPUT.PUT_LINE('QRTZ92_CRON_TRIGGERS Count = '||VCRON_COUNT);
IF VCRON_COUNT > 0 THEN
EXECUTE IMMEDIATE 'create table QRTZ92_CRON_TRIGGERS_TEMP as select * from QRTZ92_CRON_TRIGGERS';
EXECUTE IMMEDIATE 'create table QRTZ92_TRIGGERS_TEMP as select * from QRTZ92_TRIGGERS where TRIGGER_NAME in (select TRIGGER_NAME from QRTZ92_CRON_TRIGGERS) AND TRIGGER_TYPE=''CRON'' ';
DBMS_OUTPUT.PUT_LINE ('Temp tables Created.');

DBMS_OUTPUT.PUT_LINE ('Deleting records from  tables.');

FOR T IN CRONJOBS_TO_DROP
LOOP
EXECUTE IMMEDIATE 'delete from QRTZ92_CRON_TRIGGERS where trigger_name=''' || T.TRIGGER_NAME||'''';
EXECUTE IMMEDIATE 'delete from QRTZ92_TRIGGERS where trigger_name=''' || T.TRIGGER_NAME||'''';
DBMS_OUTPUT.PUT_LINE ('Deleted trigger ' || T.TRIGGER_NAME);
END LOOP;

END IF;

END;


Configure Cron from UI using backup table Cron Expression.

No comments:

Post a Comment

About OIM

Oracle Identity Management enables organizations to effectively manage the end - to - end life - cycle of user ide...

Popular Posts