Summary: | PackageNotFoundException below XtextResourceSet.getResource (247) | ||
---|---|---|---|
Product: | [Modeling] Sirius | Reporter: | EPP Error Reports <error-reports-inbox> |
Component: | Core | Assignee: | Project inbox <sirius.core-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | laurent.fasani, matippetts, pierre-charles.david, sebastian.zarnekow |
Version: | 3.0.0 | Keywords: | triaged |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
EPP Error Reports
2015-10-11 13:17:25 EDT
Appears to be a problem with session.danalysis.DAnalysisSessionImpl.addSemanticResource (In reply to Sebastian Zarnekow from comment #1) > Appears to be a problem with > session.danalysis.DAnalysisSessionImpl.addSemanticResource This method eventually defers to a normal EMF Resource.load(), which fails because the metamodel used by the resource can not be found: "Package with uri 'http://www.omg.org/spec/20130218/core' not found.". Sirius could be a little more resilient to user-model loading errors (with a nicer error message), but it won't be able to load models for which the metamodel is not available. Unless the XtextResourceSet (or the way Sirius sets it up) does something fishy with the EPackageRegistry where metamodels are expected to be found, we can not do anything on the Sirius side. In your context, does "/foo/models/movies.core" load properly outside of Sirius? For example, right click > Open With... > Other... > Sample Relfective Ecore Model Editor. * If this fails with the same kind of error, the problem is not in Sirius (except regarding the cryptic error message which should be clearer) but in that the metamodel used by movies.core is not properly installed/registered. * If it works, the problem might be in Sirius itself, or in org.eclipse.xtext.resource.XtextResourceSet. Uninstalling the "Sirius Integration with Xtext" (org.eclipse.sirius.runtime.ide.xtext) feature should make Sirius use a plain ResourceSetImpl, which would help distinguish the two possibilities. The XtextResourceSet does nothing fancy here. I think what you see is "just" a org.eclipse.emf.common.util.WrappedException as documented on ResourceSet#getResource. Sirius has to be more resilient against those. This turned out to be a problem with Acceleo. For some reason an *.emtl file was encoded with malformed URIs. I believe this is tied to an issue addressed in the Sirius documentation here: https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#acceleo "Note: due to an incompatible change in serialization format in EMF 2.9, if you use external .mtl files in your modeler definitions and build your modeler plug-ins using EMF 2.9 or later, the resulting modeler will not work with previous versions of EMF (as the resulting .emtl files will not load correctly with EMF 2.8 and earlier). For reference, EMF 2.9 corresponds to Eclipse 4.3 (Kepler)." |