Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XcoreLang.xcore file unmapped in Tycho build
XcoreLang.xcore file unmapped in Tycho build [message #1739629] Wed, 03 August 2016 11:49 Go to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hi all,

I started migrating from Buckminster to Tycho and currently try to get my Xtext bundles built. Generating xcore meta classes using xtext-maven-plugin works finally, but now I am stuck with exec-maven-plugin for generating the language infrastructure.

To let it recognise my projects I defined their name attributes in the StandardProjectConfig section of the mwe2 workflow like this:

            project = StandardProjectConfig {
                // the base plug-in's name 
                baseName = projectName
                rootPath = rootPath
                runtime = {
                    enabled = true
                    name = "bundles/${projectName}"
                }
                runtimeTest = {
                    enabled = true
                    name = "tests/${projectName}.tests"
                }
                genericIde = {
                    enabled = true
                    name = "bundles/${projectName}.ide"
                }
                eclipsePlugin = {
                    enabled = true
                    name = "bundles/${projectName}.ui"
                }
                eclipsePluginTest = {
                    enabled = true
                    name = "tests/${projectName}.ui.tests"
                }
                ideaPlugin = {
                    enabled = false
                }
                web = {
                    enabled = false
                }
                //mavenLayout = true
                createEclipseMetaData = true
            }


The build fails with the error message though:

1359 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.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
        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.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:265)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.ensureResourceCanBeLoaded(XtextGeneratorResourceSetInitializer.java:123)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.loadResource(XtextGeneratorResourceSetInitializer.java:59)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.access$0(XtextGeneratorResourceSetInitializer.java:57)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer$1.apply(XtextGeneratorResourceSetInitializer.java:49)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer$1.apply(XtextGeneratorResourceSetInitializer.java:1)
        at org.eclipse.xtext.xbase.lib.IteratorExtensions.forEach(IteratorExtensions.java:363)
        at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtensions.java:333)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.initialize(XtextGeneratorResourceSetInitializer.java:52)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorLanguage.initialize(XtextGeneratorLanguage.java:198)
        at org.eclipse.xtext.xtext.generator.StandardLanguage.initialize(StandardLanguage.java:169)
        at org.eclipse.xtext.xtext.generator.XtextGenerator.initialize(XtextGenerator.java:176)
        at org.eclipse.xtext.xtext.generator.XtextGenerator.checkConfigurationInternal(XtextGenerator.java:120)
        at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:21)
        at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:65)
        at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:197)
        at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:29)
        at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:18)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: The path '/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore' is unmapped
        at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:535)
        at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
        at org.eclipse.xtext.resource.XtextResourceSet$1.createInputStream(XtextResourceSet.java:298)
        at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
        at org.eclipse.xtext.resource.persistence.StorageAwareResource.load(StorageAwareResource.java:81)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
        ... 29 more


What do I need to add to make the XcoreLang.xcore file known?

Thanks,
Axel

[Updated on: Wed, 03 August 2016 11:49]

Report message to a moderator

Re: XcoreLang.xcore file unmapped in Tycho build [message #1739631 is a reply to message #1739629] Wed, 03 August 2016 12:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
i miss a referenceResource="....../abc.xcore" inside the language section.
(you did not post that)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: XcoreLang.xcore file unmapped in Tycho build [message #1739633 is a reply to message #1739631] Wed, 03 August 2016 12:05 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
This is included:

referencedResource = "platform:/resource/${projectName}/model/my.xcore"
Re: XcoreLang.xcore file unmapped in Tycho build [message #1739634 is a reply to message #1739633] Wed, 03 August 2016 12:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
so xtext and xcore are in the same project?
i dont know if this is a good idea


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: XcoreLang.xcore file unmapped in Tycho build [message #1739635 is a reply to message #1739634] Wed, 03 August 2016 12:19 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Yes, they are - since 2014. In general this happened to work like a charm.
Re: XcoreLang.xcore file unmapped in Tycho build [message #1739636 is a reply to message #1739635] Wed, 03 August 2016 12:20 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
But the xcore uses emf-gen as output folder and Xtend files from Xtext use xtend-gen.
Re: XcoreLang.xcore file unmapped in Tycho build [message #1739637 is a reply to message #1739636] Wed, 03 August 2016 12:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
can you share a small example project that i can run?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: XcoreLang.xcore file unmapped in Tycho build [message #1739657 is a reply to message #1739637] Wed, 03 August 2016 13:59 Go to previous message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
FTR: Christian found a missing dependency to org.eclipse.emf.ecore.xcore.lib. After having added this one the problem went away.
Previous Topic:existent JVMInferrer does not work any more
Next Topic:Composing multiple grammars and parser backend
Goto Forum:
  


Current Time: Wed Dec 11 02:57:45 GMT 2024

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

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

Back to the top