ARA/CDA Unable to deploy applications through automic in production and test

Document ID : KB000101655
Last Modified Date : 28/01/2019
Show Technical Document Details
Issue:
when we deploy Applications through ARA we are getting the below error in ARA logs 
 
2018-04-23 14:58:24,345 [64(AUTOMIC/999/SMATHEW/SHBCA)] ERROR AutomaticLogger - Exception of type 'NHibernate.Exceptions.GenericADOException' was thrown. 
could not execute batch command.[SQL: SQL not available] 
at NHibernate.AdoNet.OracleDataClientBatchingBatcher.DoExecuteBatch(IDbCommand ps) 
at NHibernate.AdoNet.AbstractBatcher.ExecuteBatchWithTiming(IDbCommand ps) 
at NHibernate.AdoNet.AbstractBatcher.ExecuteBatch() 
at NHibernate.AdoNet.AbstractBatcher.PrepareBatchCommand(CommandType type, SqlString sql, SqlType[] parameterTypes) 
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) 
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session) 
at NHibernate.Action.EntityInsertAction.Execute() 
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable) 
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list) 
at NHibernate.Engine.ActionQueue.ExecuteActions() 
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session) 
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) 
at NHibernate.Impl.SessionImpl.Flush() 
at Ventum.Bond2.Services.Executions.Impl.ExecutionService.CreateExecution(ExecutionInfo info, IDictionary`2 additionalVariables, IDictionary`2 overrideMap, ExternalDeploymentRequest externalDeploymentInfo) in E:\buildAgent\work\bondrelease\7.0.1.1@12.0.1\Projects\Ventum.Bond2.Services.Impl\Services.Executions.Impl\ExecutionService.cs:line 668 
at Ventum.Bond2.Web.Presenters.Impl.Workflows.WorkflowExecutionCreationWidgetPresenter.CreateAndExecute(ExecutionInfo executionInfo, Boolean ignoreWarning) in E:\buildAgent\work\bondrelease\7.0.1.1@12.0.1\Projects\Ventum.Bond2.Web.Framework\Presenters\Impl.Workflows\WorkflowExecutionCreationWidgetPresenter.cs:line 169 
at Castle.DynamicProxy.AbstractInvocation.Proceed() 
at Ventum.Bond2.Wiring.ExceptionLoggingInterceptor.Intercept(IInvocation invocation) in E:\buildAgent\work\bondrelease\7.0.1.1@12.0.1\Projects\Ventum.Bond2.Wiring\ExceptionLoggingInterceptor.cs:line 25 
--- INNER EXCEPTION --- 
Exception of type 'Oracle.DataAccess.Client.OracleException' was thrown. 
ORA-24381: error(s) in array DML 
ORA-00001: unique constraint (AUTOMIC_ARA.SYS_C0014530) violated 
ORA-00001: unique constraint (AUTOMIC_ARA.SYS_C0014530) violated 
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable) 
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck) 
at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery() 
at NHibernate.AdoNet.OracleDataClientBatchingBatcher.DoExecuteBatch(IDbCommand ps)



 
Cause:
ARA database got update/modified manually caused the run ID duplicated
Resolution:
when the result of this command, 

SELECT last_number FROM dba_sequences WHERE sequence_name = 'HILOSEQUENCE'; 

LAST_NUMBER 
----------- 
1622 

Which mean the maximum Id you have in the RLMOBJECT and HISTORYRECORD is 162200, however the ID you have in table RLMOBJECT and HISTORYRECORD is 250,847 

So some one must modify or update anything wrong to the HILOSEQUENCE, that cause the ID got wrongly 

When you run an other application, the new ID will be generated, so avoid the duplicated one, that is the reason you can run the CIB since it utilized the new id, the issue may happen again in the near future, 

Run below SQL to recreate the hilosequence
DROP SEQUENCE HILOSEQUENCE; 
Create sequence HILOSEQUENCE 
minvalue 1 
maxvalue 999999999999999999999 
start with 2600 
increment by 1 
cache 20;

 
Additional Information:
Please contact to Support if you got this issue, do not run any SQL without the instruction from support