Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Error when running mwe2 on xcore-based xtext project(ERROR ipse.xtext.generator.LanguageConfig - Error loading 'platform:/resource/com.telcordia.granite.sdk.validation.gevl/model/Gevl.xcore': [XtextLinkingDiagnostic: null:1 Couldn't resolve reference t)
Error when running mwe2 on xcore-based xtext project [message #1077509] Thu, 01 August 2013 20:32 Go to next message
Ed Staub is currently offline Ed StaubFriend
Messages: 12
Registered: July 2009
Junior Member
In trying to use an Xcore model for an Xtext project, I'm getting the following error message when attempting to run the mwe2 workflow:

ERROR ipse.xtext.generator.LanguageConfig  - 
Error loading 'platform:/resource/com.telcordia.granite.sdk.validation.gevl/model/Gevl.xcore': 
[XtextLinkingDiagnostic: null:1 Couldn't resolve reference to XAnnotationDirective 'Ecore'., 
 XtextLinkingDiagnostic: null:2 Couldn't resolve reference to XAnnotationDirective 'GenModel'.]

The Xcore editor works fine, and generation from Xcore works fine - it's just the mwe2 step that fails. The relevant bits of the mwe2 read:

Workflow {
    bean = StandaloneSetup {
		scanClassPath  = true
		platformUri = "${runtimeProject}/.."
	}
...
    component = Generator {
...
		language = auto-inject {
			loadedResource = "platform:/resource/com.telcordia.granite.sdk.validation.gevl/model/Gevl.xcore"
...


This is using the Kepler release.
The dependencies read:

Require-Bundle: org.eclipse.xtext;visibility:=reexport,
 org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport,
 org.eclipse.xtext.generator;resolution:=optional,
 org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional,
 org.eclipse.emf.codegen.ecore;resolution:=optional,
 org.eclipse.emf.mwe.utils;resolution:=optional,
 org.eclipse.emf.mwe2.launch;resolution:=optional,
 org.eclipse.xtext.util,
 org.antlr.runtime,
 org.eclipse.xtext.common.types,
 com.telcordia.granite.sdk.tools;bundle-version="1.0.0",
 org.eclipse.core.runtime,
 org.eclipse.emf.ecore;visibility:=reexport,
 org.eclipse.emf.ecore.xcore.lib,
 org.eclipse.emf.ecore.xcore,
 org.eclipse.xtext.xbase.lib;visibility:=reexport

Any idea of what might be wrong?

[Updated on: Thu, 01 August 2013 20:44]

Report message to a moderator

Re: Error when running mwe2 on xcore-based xtext project [message #1077552 is a reply to message #1077509] Thu, 01 August 2013 21:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
here is my working manifest

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.example.mydsl
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.example.mydsl; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext;visibility:=reexport,
 org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport,
 org.eclipse.xtext.generator;resolution:=optional,
 org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional,
 org.eclipse.emf.codegen.ecore;resolution:=optional,
 org.eclipse.emf.mwe.utils;resolution:=optional,
 org.eclipse.emf.mwe2.launch;resolution:=optional,
 test.xcore;bundle-version="0.1.0",
 org.eclipse.xtext.util,
 org.eclipse.emf.ecore,
 org.eclipse.emf.common,
 org.antlr.runtime,
 org.eclipse.xtext.common.types,
 org.eclipse.emf.codegen.ecore.xtext;bundle-version="1.0.0",
 org.eclipse.emf.ecore.xcore;bundle-version="1.1.0",
 org.eclipse.xtext.ecore;bundle-version="2.4.2"
Import-Package: org.apache.log4j,
 org.eclipse.xtext.xbase.lib
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.xtext.example.mydsl,
 org.xtext.example.mydsl.services,
 org.xtext.example.mydsl.serializer,
 org.xtext.example.mydsl.parser.antlr,
 org.xtext.example.mydsl.parser.antlr.internal,
 org.xtext.example.mydsl.validation,
 org.xtext.example.mydsl.scoping,
 org.xtext.example.mydsl.generator,
 org.xtext.example.mydsl.formatting


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error when running mwe2 on xcore-based xtext project [message #1077555 is a reply to message #1077552] Thu, 01 August 2013 21:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
and here the part of the workflow

loadedResource = "platform:/resource/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore"
    		loadedResource = "platform:/resource/test.xcore/model/test.xcore"


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error when running mwe2 on xcore-based xtext project [message #1077807 is a reply to message #1077555] Fri, 02 August 2013 07:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Christian,

Yes, the problem sounds like one of not being able to locate
XcoreLang.xcore which contains the built-in annotations definitions:

package xcore.lang

annotation "http://www.eclipse.org/emf/2002/Ecore" as Ecore
annotation "http:///org/eclipse/emf/ecore/util/ExtendedMetaData" as
ExtendedMetaData
annotation "http://www.eclipse.org/emf/2002/GenModel" as GenModel


On 01/08/2013 11:52 PM, Christian Dietrich wrote:
> and here the part of the workflow
>
> loadedResource =
> "platform:/resource/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore"
> loadedResource =
> "platform:/resource/test.xcore/model/test.xcore"


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Error when running mwe2 on xcore-based xtext project [message #1078135 is a reply to message #1077807] Fri, 02 August 2013 15:28 Go to previous messageGo to next message
Ed Staub is currently offline Ed StaubFriend
Messages: 12
Registered: July 2009
Junior Member
Confirmed - adding the extra loadedResource did the trick. Thanks much.

Should I bugzilla this, or do you (Ed?) want to, or is it working as designed?
I thought XcoreLang.xcore was supposed to be included by default - but you'd know better.
Re: Error when running mwe2 on xcore-based xtext project [message #1078539 is a reply to message #1078135] Sat, 03 August 2013 05:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Ed,

I'm not sure it's supposed to be included by default. I'm not even sure
if workflows have defaults or where/how such a thing would need to be
specified to be a default. The Xtext team is in the best position to
comment on that...


On 02/08/2013 5:28 PM, Ed Staub wrote:
> Confirmed - adding the extra loadedResource did the trick. Thanks much.
>
> Should I bugzilla this, or do you (Ed?) want to, or is it working as
> designed?
> I thought XcoreLang.xcore was supposed to be included by default - but
> you'd know better.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Error when running mwe2 on xcore-based xtext project [message #1272624 is a reply to message #1078539] Tue, 18 March 2014 11:02 Go to previous messageGo to next message
Simone Di Cola is currently offline Simone Di ColaFriend
Messages: 60
Registered: February 2014
Member
Hi,
I am experimenting the same problem. Could you please tell me how and where can I add your solution?

Thanks
Simone
Re: Error when running mwe2 on xcore-based xtext project [message #1273808 is a reply to message #1272624] Thu, 20 March 2014 15:16 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 18/03/2014 12:02, Simone Di Cola wrote:
> Hi,
> I am experimenting the same problem. Could you please tell me how and
> where can I add your solution?

I experienced some problems too, especially due to my DSL using also
Xbase; if you're interested, mwe2 now works for me, you may have a look
here:

https://github.com/LorenzoBettini/xsemantics/tree/master/plugins/it.xsemantics.dsl

I'm planning to write a blog post on a smaller example, but I don't have
time right now :)

hope this helps
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Previous Topic:Xtext artifact generation from Ecore model fails when Ecore model refers to another model.
Next Topic:mwe2 fragment documentation
Goto Forum:
  


Current Time: Thu Apr 25 18:11:38 GMT 2024

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

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

Back to the top