000017854 - AAOP - Offline task is failing with error->'java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (RSA_CORE.RBCTGRYBCKTST_PK) violated'

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000017854
Applies ToJava.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (RSA_CORE.RBCTGRYBCKTST_PK) violated.
RSA Adaptive Authentication (On Premise) (AAOP)
Issue

ERROR LOG:

22 Apr 2014 01:16:22,258 INFO [com.rsa.re.offlinetasks.tasks.bayesian.BayesianScoringOnEventBucketsPerUsers] --- Start aggregate data for 20140401 
22 Apr 2014 01:16:22,261 INFO [com.rsa.re.offlinetasks.tasks.bayesian.BayesianScoringOnEventBucketsPerUsers] Already aggregate for 20140401. Check for any sample range that is missing. 
22 Apr 2014 01:16:22,284 ERROR [com.rsa.re.offlinetasks.tasks.bayesian.BayesianScoringOnEventBucketsPerUsers] quiting Bayesian Scoring Task 
java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (RSA_CORE.RBCTGRYBCKTST_PK) violated 

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447) 
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) 
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951) 
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513) 
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227) 
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) 
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208) 
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1046) 
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336) 
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613) 
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3694) 
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1354) 
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) 
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) 
at com.rsa.db.direct.CPreparedStatementWrapper.executeUpdate(CPreparedStatementWrapper.java:405) 
at com.rsa.re.offlinetasks.tasks.bayesian.BayesianScoringOnEventBucketsPerUsers.buildStats(BayesianScoringOnEventBucketsPerUsers.java:800)

Resolution

Step 1:
truncate the following tables (you can backup them first if you wish to repeat the test or see what is the diff between them):

 truncate table ENTITY_AGGREGATIONS;  
 truncate table RBA_BS_CATEGORY_BUCKET_STAT;  
 truncate table RBA_SCORE_NORMALIZE_STAT;  
 truncate table RE_BUCKET_USER_COUNTER;  
 truncate table RE_TASK_STATUS;  
 truncate table REOT_BUCKET_AGGR_STATUS;  
 truncate table REOT_EVENT_DYNAMIC_BUCKETS;  
 truncate table REOT_EVENT_EXTRA_DATA;  
 truncate table REOT_PARTITION_KEY_DAYS_CALC;  
 truncate table REOT_TEMP_BUCKET_AGGR;  

Step 2:
Run the offline tasks in recovery mode (I think "recovery" is set as a default according to the log file) with the current date as running date.

Note: This run will take a lot of time since it will process 90 days of events for the Bayesian task and 10 days for the List Creation task, so please be patient. Also make sure that the scheduler will not run other Offline tasks process till this one ends! (You may want to stop the scheduler and run the tasks manually).

Legacy Article IDa66997

Attachments

    Outcomes