Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFStore] How to resolve checksum errors?
[EMFStore] How to resolve checksum errors? [message #1735065] Wed, 15 June 2016 08:05 Go to next message
Phil Beauvoir is currently offline Phil BeauvoirFriend
Messages: 27
Registered: October 2012
Junior Member
Hi,

I am experimenting with EMFStore with our modelling tool, Archi (http://www.archimatetool.com). I'm using Eclipse 4.6 RC4a and EMFStore 1.8 (latest version).

I've adapted the "helloworld" example to commit, update and checkout an Ecore model from our Archi app. Mostly it works, but I am seeing many checksum errors when committing the model:

"Update cancelled by checksum error handler due to invalid checksum."

I registered a ChecksumErrorHandler to return true so as to ignore the errors, and it seems that the commits are taking place, but obviously something is wrong.

My model code is very customised and I don't use proxies on EReferences.

Is there some guidance on what makes a model "well behaved" to work with EMFStore so as to avoid checksum errors?

[Updated on: Wed, 15 June 2016 08:44]

Report message to a moderator

Re: How to resolve checksum errors? [message #1735367 is a reply to message #1735065] Fri, 17 June 2016 16:21 Go to previous messageGo to next message
Edgar Mueller is currently offline Edgar MuellerFriend
Messages: 17
Registered: March 2016
Junior Member
Hi Phil,

there is some general advise, which is, that, if possible, customizing
EMF generated code should be avoided. This is not just true for
EMFStore, but also for other EMF-based frameworks.

The reasons in case of EMFStore are, that getters are called during the
serialization and setters are called during the de-serialization phase.
Both should have no side-effects, e.g. model changes in getters should
be avoided.
Also, you should not change any of the initialization of default values
within the generated factories, again, because possible side-effects
could occur.
So, to sum up, avoid customizing generated EMF code and in case this is
not possible, pay extra attention to not cause any side-effects that
could alter the behaviour during serialization/de-serialization.

HTH
Cheers,
Edgar

> Hi,
>
> I am experimenting with EMFStore with our modelling tool, Archi
> (http://www.archimatetool.com). I'm using Eclipse 4.6 RC4a and EMFStore
> 1.8 (latest version).
>
> I've adapted the "helloworld" example to commit, update and checkout an
> Ecore model from our Archi app. Mostly it works, but I am seeing many
> checksum errors when committing the model:
>
> "Update cancelled by checksum error handler due to invalid checksum."
>
> I registered a ChecksumErrorHandler to return true so as to ignore the
> errors, and it seems that the commits are taking place, but obviously
> something is wrong.
>
> My model code is very customised and I don't use proxies on EReferences.
>
> Is there some guidance on what makes a model "well behaved" to work with
> EMFStore so as to avoid checksum errors?


--
Edgar Mueller

Get Professional Eclipse Support:
http://eclipsesource.com/en/services/developer-support/
Re: How to resolve checksum errors? [message #1735374 is a reply to message #1735367] Fri, 17 June 2016 21:16 Go to previous message
Phil Beauvoir is currently offline Phil BeauvoirFriend
Messages: 27
Registered: October 2012
Junior Member
Hi Edgar,

thanks very much for your advice. I shall audit my code and see what is causing the problem.

I did notice one thing when experimenting with a very basic model - that EMFStore prefers that EReferences have proxy set to true. If set to false I was getting checksum errors.

Phil
Previous Topic:export model to xsd with referenced generator model
Next Topic:[Teneo] Problem setting a primary composite key that is also a foreign key
Goto Forum:
  


Current Time: Tue Nov 21 15:39:11 GMT 2017

Powered by FUDForum. Page generated in 0.01459 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software