Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface ...(I try to generate code from an UML2 model using an MWE2 workflow)
org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface ... [message #676185] Fri, 03 June 2011 02:32 Go to next message
Olaf Bigalk is currently offline Olaf Bigalk
Messages: 41
Registered: July 2009
Location: Berlin
Member
Hello,

I try to generate code from an UML2 model using an MWE2 workflow.
But when org.eclipse.xpand2.Generator I try to register my model to the StandaloneSetup I get the following error:
org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface net.bigalk.mdsd.iPhone.model.uml.IPhoneAppModel


My workflow:
var fileEncoding = "UTF-8"
var outlet = "src-gen"
var slotName = "model"
var modelURI= "plattform:/resource/net/bigalk/mdsd/iPhone/model/uml/IPhoneAppModel.uml"
var projectName = "net.bigalk.mdsd.iPhone.model.uml"
var runtimeProject = "../${projectName}"

	bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
		platformUri = "${runtimeProject}/.."	
		registerGeneratedEPackage  = "${projectName}.IPhoneAppModel"
	}

	component = org.eclipse.emf.mwe.utils.Reader {
		uri = modelURI
		modelSlot  = "${slotName}"
		
	 }
	component = org.eclipse.xpand2.Generator{
		expand = "templates::MetaModelFile::main FOREACH ${slotName}"
		outlet = {
			name = outlet
		}
		fileEncoding = fileEncoding
	}


I have an UML file IPhoneAppModel.uml placed in the package net.bigalk.mdsd.iPhone.model.uml.

What I am doing wrong? Sad
Re: org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface ... [message #676201 is a reply to message #676185] Fri, 03 June 2011 03:45 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6141
Registered: July 2009
Senior Member
Hi,

i the are some missunderstandings bult in into your workflow. a workflow for processing uml2 models ususally looks like
(syntax is mwe but should be easyly transferable to mwe2)

<workflow>
	
	<bean class="org.eclipse.xtend.typesystem.uml2.Setup" standardUML2Setup="true" />
	
	<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" platformUri=".." />
	
	<component class="org.eclipse.emf.mwe.utils.Reader">
		<uri value="platform:/resource/xpand.uml.sample/src/model/test.uml" />
		<modelSlot value="model" />
	</component>
	
	<component class="org.eclipse.emf.mwe.utils.DirectoryCleaner">
		<directory value="src-gen" />
	</component>
	
	
	<component class="org.eclipse.xpand2.Generator">
		<metaModel class="org.eclipse.xtend.typesystem.uml2.UML2MetaModel" />
		<expand value="template::Template::main FOR model" />
		<outlet path="src-gen" >
			<postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" />
		</outlet>
	</component>
	

</workflow>


~Christian
Re: org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface ... [message #676218 is a reply to message #676201] Fri, 03 June 2011 05:09 Go to previous messageGo to next message
Olaf Bigalk is currently offline Olaf Bigalk
Messages: 41
Registered: July 2009
Location: Berlin
Member
Hi Christian,

thank you for your quick answer.
Now I have the problem that the my model is not recognized due to it is not mapped.

1141 ERROR Mwe2Launcher       - Problems running workflow workflow.MetaModelFileGenerator: Couldn't load resource under platform:/resource/net/bigalk/mdsd/iPhone/model/uml/IPhoneAppModel : java.io.IOException: The path '/net/bigalk/mdsd/iPhone/model/uml/IPhoneAppModel' is unmapped


What I need to do to map my model?
Re: org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface ... [message #676222 is a reply to message #676218] Fri, 03 June 2011 05:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6141
Registered: July 2009
Senior Member
Hi,

how das your current workflow look like? i guess platform:/resource/net/bigalk/mdsd/iPhone/model/uml/IPhoneAppModel should be platform:/resource/net/bigalk/mdsd/iPhone/model/uml/IPhoneAppModel.uml if you have a file IPhoneAppModel.uml within the workspace project net in the folder bigalk...uml. i guess this is not the case. please note: the syntax is: platform:/resource/<projectname>/<folder>/<subfolder>/.../<filename>.<extension>

~Christian
Re: org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface ... [message #676231 is a reply to message #676222] Fri, 03 June 2011 06:00 Go to previous messageGo to next message
Olaf Bigalk is currently offline Olaf Bigalk
Messages: 41
Registered: July 2009
Location: Berlin
Member
Hi Christian,

thank you for your answer that does the trick. Smile
How do I configure a default outlet? Confused

java.lang.RuntimeException: Problems running workflow workflow.MetaModelFileGenerator: No default outlet was configured!


My workflow:

    ...
    component = org.eclipse.xpand2.Generator {
        expand = "templates::MetaModelFile::main FOR ${slotName}"
        outlet = {
            name = outlet
            
        }
        fileEncoding = fileEncoding
    }
Re: org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface ... [message #676253 is a reply to message #676231] Fri, 03 June 2011 08:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6141
Registered: July 2009
Senior Member
hi,

what about
outlet = {
            path = "src-gen"       
        }


~Christian
Re: org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface ... [message #676271 is a reply to message #676253] Fri, 03 June 2011 09:19 Go to previous message
Olaf Bigalk is currently offline Olaf Bigalk
Messages: 41
Registered: July 2009
Location: Berlin
Member
Thank you thats it now it works.
Previous Topic:[Acceleo] Null pointer exception using profiles
Next Topic:not able to work with JET
Goto Forum:
  


Current Time: Tue Jul 29 06:57:22 EDT 2014

Powered by FUDForum. Page generated in 0.04765 seconds