Xcore model with Xtext path unmapped exception

620 views Asked by At

I am using the vanilla new Xtext project with the Model and Greeting grammar. I have added a new Xcore project following along with this blog post (https://blogs.itemis.com/en/using-xtext-with-xcore-and-gradle). I am also using the Gradle setup as described and there is no Manifest in the DSL project.

I have added references to the Xcore model through the build.gradle file and using the "referencedResource" in the mwe2 file. However, trying to build the workflow (mwe2), I get:

sing resourceSet registry. The registered Packages will not be registered in the global EPackage.Registry.INSTANCE!
657  [main] ERROR textGeneratorResourceSetInitializer  - Couldn't initialize Xcore support. Is it on the classpath?
659  [main] ERROR textGeneratorResourceSetInitializer  - Could not load XcoreLang.xcore.
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.IOException: The path '/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore' is unmapped

<snip/>
667  [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems running workflow org.xtext.example.mydsl.GenerateMyDsl: org.xml.sax.SAXParseExceptionpublicId: platform:/resource/org.xtext.example.mydsl.model/src/mydsl.xcore; systemId: platform:/resource/org.xtext.example.mydsl.model/src/mydsl.xcore; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
java.lang.RuntimeException: Problems running workflow org.xtext.example.mydsl.GenerateMyDsl: org.xml.sax.SAXParseExceptionpublicId: platform:/resource/org.xtext.example.mydsl.model/src/mydsl.xcore; systemId: platform:/resource/org.xtext.example.mydsl.model/src/mydsl.xcore; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

If I hit F3 in the grammar (xtext file), it will find the corresponding Xcore definition, so I can't figure out where the references are going wrong here. How do I fix this path unmapped exception?

0

There are 0 answers