Feb 27, 2012, 4:39 AM
170 Posts

Getting random replica conflicts in application

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 3
The application has an XPage with one datasouce. There are several cutom controls in the application.
Everything that writes and saves to the datasaouce is doing so thru currentDocument no other communication. 
And randomly the users get a replica save conflict. when saving the data. I tried so switch to forces mode but that made things worse. 
because when the problem ocurred every change was lost.  
I have verified and there is only one currentDocument.save() done in each sequence.
The only thing I have seen in the log is this 
HTTP JVM: !err.PersistenceServiceResourceProvider.Errorwritingtopersistedcontenttor!. 
Any ideas what could be wrong ?
Is it a known bug that is verified as fixed in 8.5.3? 
Feb 27, 2012, 9:05 AM
366 Posts
Re: Getting random replica conflicts in application
 Verify that none of the defined and used custom controls have a data source defined.
If the datasource is defined on the XPage and on the customcontrol, it can cause two documents to be saved and sometimes replication save conflicts depending upon the save action. 
Paul T. Calhoun 
Feb 28, 2012, 2:29 AM
170 Posts
Re: Getting random replica conflicts in application
 Thanks for responding but this was the first thing I checked.
Feb 28, 2012, 3:30 PM
589 Posts
Re: Getting random replica conflicts in application
 Not sure what this could be.  Are you doing a computeWithForm?  though I doubt that would be the problem.
I typically avoid using currentDoc and use the var name of the datasource directly.  It might be interesting to change that and see if it goes away.  Have you changed the scope of your dataSource by any chance?  Just thinking out loud really.... 
Have you looked at the documents to see if you can spot a difference?