Bug 526513 - Cannot reopen AIRD file in Oxygen
Summary: Cannot reopen AIRD file in Oxygen
Status: CLOSED DUPLICATE of bug 513407
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2017-10-26 10:10 EDT by Ewoud Werkman CLA
Modified: 2017-12-06 10:17 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ewoud Werkman CLA 2017-10-26 10:10:14 EDT
What steps will reproduce the problem?
1. Create a ecore model and AIRD file
2. Close eclipse or project 
3. Reopen project / eclipse: renders the error. Ecore model is ok


-- Error Details --
Date: Thu Oct 26 16:00:45 CEST 2017
Message: An internal error occurred during: "Loading models".
Severity: Error
Product: Eclipse 4.7.1.20171005-1200 (org.eclipse.epp.package.modeling.product)
Plugin: org.eclipse.core.jobs
Session Data:
eclipse.buildId=4.7.1.M20171009-0410
java.version=1.8.0_152
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.modeling.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.modeling.product

Exception Stack Trace:
java.lang.RuntimeException: The modeling project "ESDL" is invalid: Problem during loading models: Cannot modify resource set without a write transaction
	at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.runInWorkspace(OpenRepresentationsFileJob.java:136)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.lang.IllegalStateException: Cannot modify resource set without a write transaction
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.assertWriting(TransactionChangeRecorder.java:349)
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.appendNotification(TransactionChangeRecorder.java:303)
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.processObjectNotification(TransactionChangeRecorder.java:285)
	at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:241)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
	at org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDConcreteComponentImpl.java:1153)
	at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:249)
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:457)
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:400)
	at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractEList.java:372)
	at org.eclipse.xsd.impl.XSDSimpleTypeDefinitionImpl.createFundamentalFacets(XSDSimpleTypeDefinitionImpl.java:3037)
	at org.eclipse.xsd.impl.XSDSimpleTypeDefinitionImpl.getCardinalityFacet(XSDSimpleTypeDefinitionImpl.java:3000)
	at org.eclipse.xsd.impl.XSDSimpleTypeDefinitionImpl.eGet(XSDSimpleTypeDefinitionImpl.java:2599)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:998)
	at org.eclipse.sirius.ecore.extender.tool.internal.ReferencesResolver.resolveCrossReferences(ReferencesResolver.java:100)
	at org.eclipse.sirius.ecore.extender.tool.internal.ReferencesResolver.doResolveAll(ReferencesResolver.java:93)
	at org.eclipse.sirius.ecore.extender.tool.internal.ReferencesResolver.resolve(ReferencesResolver.java:74)
	at org.eclipse.sirius.ecore.extender.tool.api.ModelUtils.resolveAll(ModelUtils.java:452)
	at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesTracker.forceLoadingOfEveryLinkedResource(SessionResourcesTracker.java:180)
	at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesTracker.initialize(SessionResourcesTracker.java:97)
	at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.open(DAnalysisSessionImpl.java:1149)
	at org.eclipse.sirius.business.internal.session.SessionManagerImpl.openSession(SessionManagerImpl.java:382)
	at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.performOpenSession(OpenRepresentationsFileJob.java:157)
	at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.runInWorkspace(OpenRepresentationsFileJob.java:126)
	... 2 more
Comment 1 Pierre-Charles David CLA 2017-10-26 11:26:28 EDT
Moving to Sirius. Can you attach the offending Ecore (maybe simplified/obfuscated if needed)? The certainly does not happen with most Ecore files. From the stack I assume you created your Ecore from an existing XSD?
Comment 2 Pierre-Charles David CLA 2017-10-27 03:37:38 EDT
I can't reproduce even using and XSD-based ecore (using the library.xsd example from the EMF documentation). Once I got the ecore, I created a Sirius session, enabled the "Design" viewpoint from Ecore Tools and created a class diagram. Closing/reopening the diagram, or the session, or the whole Eclipse works without any issue (and nothing in the error log). Whatever the bug is, it seems dependant on specific conditions.
Comment 3 Pierre-Charles David CLA 2017-12-06 10:17:56 EST
Given the stack, it looks like a duplicate of bug #513407.

*** This bug has been marked as a duplicate of bug 513407 ***