AAI Job Definitions not updating -[ORA-00001: unique constraint (XAK1JAWSJOB) violated
search cancel

AAI Job Definitions not updating -[ORA-00001: unique constraint (XAK1JAWSJOB) violated

book

Article ID: 410856

calendar_today

Updated On:

Products

Automation Analytics & Intelligence

Issue/Introduction

When running AAI 24.1 or 24.2 you may see an issue with your Job Definitions failing to update for an Autosys scheduler.
 
You may see one or both of the errors below in the jaws.log:
 
WARN [ConverterServiceControl] Error occurred while converting scheduler "<SchedulerName>" (no changes committed)
org.hibernate.exception.ConstraintViolationException: could not execute batch [ORA-00001: unique constraint (XAK1JAWSJOB) violated
 
https://docs.oracle.com/error-help/db/ora-00001/] [insert into JawsJob (autoAdjust,cstcOffset,deletedTime,extId,ignoreFromCCM,machineId,jobName,jobSchedulerId,timeZone,jobTypeId,parentJobId,discriminator,jobId) values (?,?,?,?,?,?,?,?,?,?,?,'AutosysBox',?)]
at deployment.aai.war/org.hibernate.dialect.OracleDialect.lambda$buildSQLExceptionConversionDelegate$1(OracleDialect.java:1168) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:58) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.engine.jdbc.batch.internal.BatchImpl.lambda$performExecution$2(BatchImpl.java:293) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.engine.jdbc.mutation.internal.PreparedStatementGroupSingleTable.forEachStatement(PreparedStatementGroupSingleTable.java:67) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.engine.jdbc.batch.internal.BatchImpl.performExecution(BatchImpl.java:264) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.engine.jdbc.batch.internal.BatchImpl.execute(BatchImpl.java:242) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:188) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:674) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:511) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:414) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:41) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1429) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1415) ~[hibernate-core-6.6.13.Final.jar:6.6.13.Final]
at deployment.aai.war/com.termalabs.common.connection.hibernate.GenericSessionImpl.flush(GenericSessionImpl.java:372) ~[jaws-common-connection-24.2.0-1.jar:?]
at deployment.aai.war/com.termalabs.server.cache.scheduler.ContextDatabaseHelper.doJawsJobChanges(ContextDatabaseHelper.java:986) ~[jaws-server-base-24.2.0-1.jar:?]
at deployment.aai.war/com.termalabs.server.cache.scheduler.ContextDatabaseHelper.commitChanges(ContextDatabaseHelper.java:302) ~[jaws-server-base-24.2.0-1.jar:?]
at deployment.aai.war/com.termalabs.server.cache.scheduler.SchedulerUpdateImpl.saveObjects(SchedulerUpdateImpl.java:590) ~[jaws-server-base-24.2.0-1.jar:?]
at deployment.aai.war/com.termalabs.server.cache.scheduler.SchedulerUpdateImpl.commit(SchedulerUpdateImpl.java:334) ~[jaws-server-base-24.2.0-1.jar:?]
at deployment.aai.war/com.termalabs.server.cache.scheduler.SchedulerUpdateImpl.commit(SchedulerUpdateImpl.java:307) ~[jaws-server-base-24.2.0-1.jar:?]
at deployment.aai.war/com.termalabs.server.app.startup.ConverterServiceControl.runConverterForScheduler(ConverterServiceControl.java:419) ~[jaws-server-base-24.2.0-1.jar:?]
at deployment.aai.war/com.termalabs.server.app.startup.ConverterServiceControl.convertScheduler(ConverterServiceControl.java:346) [jaws-server-base-24.2.0-1.jar:?]
at deployment.aai.war/com.termalabs.server.app.startup.ConverterServiceControl$1.run(ConverterServiceControl.java:261) [jaws-server-base-24.2.0-1.jar:?]
at java.base/java.util.TimerThread.mainLoop(Timer.java:566) [?:?]
at java.base/java.util.TimerThread.run(Timer.java:516) [?:?]
Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (XAK1JAWSJOB) violated
 

 

Or the error below:

INFO [AdminOperationQueuePolicy] task finished: DOWNLOAD_SCHEDULER

ERROR [SchedulersService] caught unexpected Exception on update now Scheduler : com.termalabs.common.JawsException: java.lang.IllegalArgumentException: Existing job not found: UUID[AZkOSPAHAgY=]

Environment

AAI 24.1.x or 24.2.x

Cause

This can occur if a box job is renamed and then inserted again with the same name as the old name without AAI attempting to update job definitions in between these two events.

Resolution

A fix has been released in 24.2.0-3 and later.

Please upgrade to this release or later to resolve the issue.