Version Differences for Error storing object in database: Version X is not up to date Y for Z

(There is no 'Y' in the error)
Line 10:
  com.urbancode.anthill3.domain.lock.LockableResource: Persistent IDs cannot be changed once set</pre>    com.urbancode.anthill3.domain.lock.LockableResource: Persistent IDs cannot be changed once set</pre> 
       
- = Cause =   + = Explanation =  
       
  There are internal database tables that keep track of every record being wrote to it. Every time a change is made to a property/lock/etc., that version is incremented. When working in parallel, it is possible that both objects will try to update the version number to the next highest amount, but one object may have already succeeded in the update. Therefore, the next object will fail since the version number is already at the version it was going to assign. Some of this can be found within Anthill's '''HI_LO_SEQ''' table:    There are internal database tables that keep track of every record being wrote to it. Every time a change is made to a property/lock/etc., that version is incremented. When working in parallel, it is possible that both objects will try to update the version number to the next highest amount, but one object may have already succeeded in the update. Therefore, the next object will fail since the version number is already at the version it was going to assign. Some of this can be found within Anthill's '''HI_LO_SEQ''' table: 
Line 41:
       
  If the updated version is less than what the HI_VAL is already set to in the database, it is discarded and an exception is thrown.    If the updated version is less than what the HI_VAL is already set to in the database, it is discarded and an exception is thrown. 
       
    + = Error Examples =  
    + == Locking ==  
    + <pre>2012-08-31 12:29:40,574 ERROR BasicLockManager-Anthill com.urbancode.anthill3.services.jobs.JobServiceServer -  
    + com.urbancode.anthill3.domain.lock.LockableResource: Persistent IDs cannot be changed once set  
    + com.urbancode.anthill3.domain.persistent.PersistenceException: com.urbancode.anthill3.domain.lock.LockableResource: Persistent IDs cannot be changed once set  
    + at com.urbancode.anthill3.persistence.UnitOfWorkDefault.commit0(UnitOfWorkDefault.java:205)  
    + at com.urbancode.anthill3.persistence.UnitOfWork.commit(UnitOfWork.java:858)  
    + at com.urbancode.anthill3.services.jobs.JobServiceServer.agentAcquireFailure(JobServiceServer.java:366)  
    + at com.urbancode.anthill3.services.jobs.Job.abortWaitingForLock(Job.java:1042)  
    + at com.urbancode.anthill3.services.jobs.JobLockCallback.abort(JobLockCallback.java:20)  
    + at com.urbancode.commons.locking.basic.BasicLockManager.processAcquisitionRequests(BasicLockManager.java:773)  
    + at com.urbancode.commons.locking.basic.BasicLockManager.processRequests(BasicLockManager.java:459)  
    + at com.urbancode.commons.locking.basic.AcquisitionRunnable.run(AcquisitionRunnable.java:25)  
    + at java.lang.Thread.run(Thread.java:662)  
    + Caused by: java.lang.IllegalStateException: com.urbancode.anthill3.domain.lock.LockableResource: Persistent IDs cannot be changed once set  
    + at com.urbancode.anthill3.domain.persistent.AbstractPersistent.setId(AbstractPersistent.java:112)  
    + at com.urbancode.anthill3.domain.persistent.HiLoIdentityGenerator.assignIdentity(HiLoIdentityGenerator.java:62)  
    + at com.urbancode.anthill3.persistence.UnitOfWorkDefault.commit0(UnitOfWorkDefault.java:139)  
    + ... 8 more</pre>  
       
    + == Build Life Job Trace Changes ==  
    + <pre>2012-08-31 12:37:26,903 ERROR JobThread-125:  
    + com.urbancode.anthill3.domain.jobtrace.buildlife.BuildLifeJobTraceDaoSql -  
    + Error storing object in database: Version 54 is not up to date for build life job trace 35209255  
    + com.urbancode.anthill3.domain.persistent.ConcurrentModificationException: Version 54 is not up to date for build life job trace 35209255  
    + at com.urbancode.anthill3.domain.jobtrace.buildlife.BuildLifeJobTraceDaoSql.update(BuildLifeJobTraceDaoSql.java:211)  
    + at com.urbancode.anthill3.domain.jobtrace.buildlife.BuildLifeJobTraceDaoSql.update(BuildLifeJobTraceDaoSql.java:36)  
    + at com.urbancode.anthill3.persistence.UnitOfWorkDefault.commit0(UnitOfWorkDefault.java:162)  
    + at com.urbancode.anthill3.persistence.UnitOfWork.commit(UnitOfWork.java:858)  
    + at com.urbancode.anthill3.services.jobs.StepExecutor.execute(StepExecutor.java:348)  
    + at com.urbancode.anthill3.services.jobs.StepExecutor.execute(StepExecutor.java:174)  
    + at com.urbancode.anthill3.services.jobs.JobDelegate.executeStep(JobDelegate.java:145)  
    + at com.urbancode.anthill3.services.jobs.JobConfigJobDelegate.executeSteps(JobConfigJobDelegate.java:179)  
    + at com.urbancode.anthill3.services.jobs.JobConfigJobDelegate.perform(JobConfigJobDelegate.java:52)  
    + at com.urbancode.anthill3.services.jobs.Job.run(Job.java:225)  
    + at com.urbancode.commons.util.ThreadPool$WorkerThread.run(ThreadPool.java:207)</pre>  
       
    + == Parallel Property Update on Build Life ==  
    + <pre>2012-08-13 14:19:16,132 ERROR - Error storing object in database:  
    + Version 48 is not up to date for build life job trace 525252</pre>