Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347318

Summary: UnknownSessionExeption during commit() after applying an EMFCompare delta on an EMFStore object
Product: [Modeling] EMFStore Reporter: Philipp Hauer <philipp.hauer>
Component: ClientcoreAssignee: Florian Pirchner <florian.pirchner>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emueller, mkoegel
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Main and MyMatchEngine none

Description Philipp Hauer CLA 2011-05-26 09:56:43 EDT
Created attachment 196663 [details]
Main and MyMatchEngine

Hello,

I want to create a change delta between two eobjects. One eobject originates from a parsed xtext model. The other is checked out from emfstore. I want to apply the delta to the object from the emfstore and commit the changes.

Strangely, I get an UnknownSessionException when I call commit():
Caused by: org.unicase.emfstore.exceptions.UnknownSessionException: Session unkown to Connection manager, log in first!
	at org.unicase.workspace.connectionmanager.AbstractConnectionManager.getConnectionProxy(AbstractConnectionManager.java:61)
	at org.unicase.workspace.connectionmanager.xmlrpc.XmlRpcConnectionManager.resolveVersionSpec(XmlRpcConnectionManager.java:187)
	at org.unicase.workspace.impl.ProjectSpaceImpl.resolveVersionSpec(ProjectSpaceImpl.java:1580)
	at org.unicase.workspace.impl.ProjectSpaceImpl.prepareCommit(ProjectSpaceImpl.java:1191)
	at org.unicase.workspace.impl.ProjectSpaceImpl.commit(ProjectSpaceImpl.java:1167)
	at org.unicase.workspace.impl.ProjectSpaceImpl.commit(ProjectSpaceImpl.java:1154)
	at org.unicase.workspace.impl.ProjectSpaceImpl.commit(ProjectSpaceImpl.java:2497)
	at de.archtech.kvasy.ide.core.ui.navigator.internal.actions.provider.RefreshActionProvider$7$1.run(RefreshActionProvider.java:340)

* When I remove the EMFCompare code and alter the oldRepoModel manuelly everything works fine.
* It seems to depend on the extent of the merge: If the delta is small enought (e.g. just a letter appended on a String-Field), EMFCompare recoginized this change correctly (call to the setter). The commit succeeds. But in the case, that EMFCompare can't figure out the similarity between the field values, he just deletes the whole node and creates a new one with the new attribute value. In this case, the Exceptions appears.
* calling "projectSpace.getUsersession().logIn()" before committing solves the problem.

Best Regards
Philipp Hauer