Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Registering a resource factory(what registers a resource factory for running the mwe2 workflow)
Registering a resource factory [message #714075] Tue, 09 August 2011 18:36 Go to next message
sungam  is currently offline sungam Friend
Messages: 21
Registered: March 2010
Junior Member
Hi,

I am getting this error when trying to run the mwe2 workflow.

[ERROR] java.lang.RuntimeException: Cannot create a resource for 'c:\work\org.xtext.example.mydsl/src/main/resources/
org/xtext/example/mydsl/GenerateMyDsl.mwe2'; a registered resource factory is need
ed
[ERROR]         at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResour
ce(ResourceSetImpl.java:394)
[ERROR]         at org.eclipse.xtext.resource.SynchronizedXtextResourceSet.getRe
source(SynchronizedXtextResourceSet.java:23)
[ERROR]         at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner
.java:59)
[ERROR]         at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner
.java:55)
[ERROR]         at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Laun
cher.java:74)
[ERROR]         at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Lau
ncher.java:35)


And below is my mwe2 workflow description:
....
var grammarURI = "classpath:/org/xtext/example/mydsl/MyDsl.xtext"
var file.extensions = "mydsl"
var projectName = "org.xtext.example.mydsl"
var runtimeProject = "../${projectName}"

Workflow {
    bean = StandaloneSetup {
	    scanClassPath = true
	    platformUri = "${runtimeProject}/.."
	}



Could someone advice what could be causing this?
Re: Registering a resource factory [message #714104 is a reply to message #714075] Tue, 09 August 2011 19:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13887
Registered: July 2009
Senior Member
Hi

do you call this from standalone? if you you should call Mwe2StandaloneSetup.doSetup()

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Registering a resource factory [message #714108 is a reply to message #714104] Tue, 09 August 2011 20:01 Go to previous messageGo to next message
sungam  is currently offline sungam Friend
Messages: 21
Registered: March 2010
Junior Member
This is run from maven2 build, using fornax-oaw-m2-plugin...
Re: Registering a resource factory [message #714123 is a reply to message #714108] Tue, 09 August 2011 20:53 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13887
Registered: July 2009
Senior Member
Hi,

i am not an maven expert but did you read what Karsten blogged arround this e.g. http://kthoms.wordpress.com/2010/08/18/building-xtext-projects-with-maven-tycho/

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:How to find files paths/names in project running with Xtend
Next Topic:AdditionalProposalInfo for enum rule
Goto Forum:
  


Current Time: Wed Apr 21 01:05:07 GMT 2021

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

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

Back to the top