JPL-IMCE / gov.nasa.jpl.imce.oml

Ontology Modeling Language (OML) Workbench
14 stars 1 forks source link

Problems with Sirius initialization #269

Open NicolasRouquette opened 6 years ago

NicolasRouquette commented 6 years ago

When a representations.aird file is present, there is usually an exception with OML WB 0.9.5.1:

!MESSAGE An internal error occurred during: "Loading models".
!STACK 0
java.lang.RuntimeException: The modeling project "gov.nasa.jpl.imce.caesar.workflows.europa" 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.processResourceNotification(TransactionChangeRecorder.java:273)
    at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:239)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    at org.eclipse.emf.common.notify.impl.NotifyingListImpl.dispatchNotification(NotifyingListImpl.java:261)
    at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:294)
    at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:305)
    at gov.nasa.jpl.imce.oml.zip.OMLSpecificationTables.load(OMLSpecificationTables.java:3162)
    at gov.nasa.jpl.imce.oml.zip.OMLZipResource.loadInternal(OMLZipResource.java:492)
    at gov.nasa.jpl.imce.oml.zip.OMLZipResource.load(OMLZipResource.java:181)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
    at org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:265)
    at org.eclipse.sirius.ecore.extender.tool.api.ModelUtils.getResource(ModelUtils.java:311)
    at org.eclipse.sirius.viewpoint.impl.DAnalysisImpl.getModels(DAnalysisImpl.java:193)
    at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesTracker.resolveAllSemanticResourcesFromModels(SessionResourcesTracker.java:222)
    at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesTracker.initialize(SessionResourcesTracker.java:93)
    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

The workaround is to delete the representations.aird file, remove the Modeling Perspective from the project and add the Modeling Perspective again. This forces Sirius to create a new representations.aird file; this time, without this exception.