Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » Error loading representations file in Mars (regression?)
Error loading representations file in Mars (regression?) [message #1697255] Tue, 02 June 2015 18:20 Go to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
I have a model whose representation's file opens in Luna SR2 (4.4.2) but fails to open in Mars (4.5 RC1) with the exception below.

The core of the error is the following:

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.EPackageImpl@6040c56c (eProxyURI: platform:/resource/org.eclipse.papyrusrt.xtumlrt.common.model/model/common.ecore#/)' is not legal. (platform:/resource/org.eclipse.papyrusrt.xtumlrt.common.model/model/representations.aird, 3, 60)


This is very strange because it suggests that a URI value is not legal, namely the URI of the corresponding .ecore file, but that value, in particular that file is legal, and it is there, next to the representations file.

What's the problem?

Is this a regression?

The error occurs in

Eclipse Modeling Tools 4.5.0.20150520-1810 epp.package.modeling null

which comes with

Ecore Diagram Editor 3.0.0.201505180720 org.eclipse.emf.ecoretools.design.feature.group Eclipse Modeling Project
Sirius Core Runtime 3.0.0.201505191600 org.eclipse.sirius.runtime.feature.group Eclipse Modeling Project
Sirius Runtime IDE 3.0.0.201505191600 org.eclipse.sirius.runtime.ide.ui.feature.group Eclipse Modeling Project
Sirius Runtime Support for AQL (Experimental) 3.0.0.201505191600 org.eclipse.sirius.runtime.aql.feature.group Eclipse Modeling Project
EMF - Eclipse Modeling Framework SDK 2.11.0.v20150518-0831 org.eclipse.emf.sdk.feature.group Eclipse Modeling Project


The full exception is the following:

org.eclipse.core.runtime.CoreException: Error while loading representations file
	at org.eclipse.sirius.business.internal.session.SessionFactoryImpl.loadSessionModelResource(SessionFactoryImpl.java:129)
	at org.eclipse.sirius.business.internal.session.SessionFactoryImpl.createSession(SessionFactoryImpl.java:101)
	at org.eclipse.sirius.business.internal.session.SessionManagerImpl.getSession(SessionManagerImpl.java:252)
	at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.performOpenSession(OpenRepresentationsFileJob.java:309)
	at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.runInWorkspace(OpenRepresentationsFileJob.java:213)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.EPackageImpl@6040c56c (eProxyURI: platform:/resource/org.eclipse.papyrusrt.xtumlrt.common.model/model/common.ecore#/)' is not legal. (platform:/resource/org.eclipse.papyrusrt.xtumlrt.common.model/model/representations.aird, 3, 60)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$ResourceLocator.demandLoadHelper(ResourceSetImpl.java:804)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$MappedResourceLocator.getResource(ResourceSetImpl.java:1204)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:352)
	at org.eclipse.sirius.business.internal.session.SessionFactoryImpl.loadSessionModelResource(SessionFactoryImpl.java:117)
	... 6 more
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.EPackageImpl@6040c56c (eProxyURI: platform:/resource/org.eclipse.papyrusrt.xtumlrt.common.model/model/common.ecore#/)' is not legal. (platform:/resource/org.eclipse.papyrusrt.xtumlrt.common.model/model/representations.aird, 3, 60)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2697)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2682)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTypeName(XMLHandler.java:2141)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2067)
	at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:128)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1850)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1030)
	at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:81)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1008)
	at org.eclipse.emf.ecore.xmi.impl.SAXWrapper.startElement(SAXWrapper.java:92)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:356)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:332)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
	at org.eclipse.sirius.business.internal.resource.AirDResourceImpl.load(AirDResourceImpl.java:118)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	... 10 more
Caused by: java.lang.UnsupportedOperationException
	at org.eclipse.emf.common.util.BasicEList$UnmodifiableEList.grow(BasicEList.java:1029)
	at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:416)
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1173)
	at org.eclipse.sirius.business.internal.resource.parser.RepresentationsFileXMIHelper.setValue(RepresentationsFileXMIHelper.java:66)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2692)
	... 39 more
Re: Error loading representations file in Mars (regression?) [message #1701728 is a reply to message #1697255] Wed, 15 July 2015 09:33 Go to previous messageGo to next message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi,

the .aird file should be migrated during the loading, but if you at some point you did test milestone builds of EcoreTools and Sirius you could end up with a migration which is not trigerred.
At the top of the .aird file there is version attribute in the viewpoint:DAnalysis root, can you paste here its value ? (something like : version="10.0.10.201502231700")






http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: Error loading representations file in Mars (regression?) [message #1705181 is a reply to message #1701728] Wed, 12 August 2015 16:10 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
The value is

version=10.0.10.201502231700

The file still doesn't open with

Eclipse SDK 4.5.0.I20150603-2000
Ecore Diagram Editor (SDK) 3.0.0.201505261431

Is there any way I can trigger the migration manually?

Thanks

Re: Error loading representations file in Mars (regression?) [message #1705282 is a reply to message #1705181] Thu, 13 August 2015 12:58 Go to previous messageGo to next message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
yes, replace the version with an older one in the .aird file like version="8.1.1", then during loading the migrations in between will be triggered.

http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: Error loading representations file in Mars (regression?) [message #1705307 is a reply to message #1705282] Thu, 13 August 2015 16:00 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Thanks, it worked! But I had to restart Eclipse.
Re: Error loading representations file in Mars (regression?) [message #1705309 is a reply to message #1705307] Thu, 13 August 2015 16:16 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Good to know, thanks for your feedback !

http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:problem with the installation of ecore diagram editor
Next Topic:Accessing external meta-models and code generation
Goto Forum:
  


Current Time: Fri Apr 26 01:08:30 GMT 2024

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

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

Back to the top