Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Problem with XPAND2 generator after migration to mwe
icon9.gif  Problem with XPAND2 generator after migration to mwe [message #512909] Mon, 08 February 2010 10:45 Go to next message
Carmen  is currently offline Carmen Friend
Messages: 9
Registered: February 2010
Junior Member
Hello all,

I'm trying to solve an error since days, and I'm really running out of ideas on
what can be wrong. I have a project and I'm migrating to Galileo and of course,
migrating from oaw to mwe.

I tried to follow the general template provided. My problem is with my workflow, I cannot
generate any file using the xpand generator. I got the following error:

[ERROR]: No Definition 'example::example::Foo::Root for amm::DecisionModel' found!
(Element: EXPAND example::example::Foo::Root FOR model;
Reported by: Generator: generating 'example::example::Foo::Root FOR model'
=> E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/e xample/example/)

My workflow is:
<?xml version="1.0"?>
<workflow>
<property name="model" value="example/example/a.am" />

<!-- load model and store it in slot 'model' -->
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="platform:/resource/${model}" />
<modelSlot value="model" />
<firstElementOnly value="true"/>
</component>

<component id="generator" class="org.eclipse.xpand2.Generator">
<fileEncoding value="ISO-8859-1"/>
<metaModel id="mm" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
<metaModelPackage value="myproject.amm.AmmPackage"/>
</metaModel>
<expand value="example::example::Foo::Root FOR model"/>
<outlet path="${srcGenPath}/" />
</component>
</workflow>

I'm really lost! I tryed to follow the trace and what I could see is that the configuration is ok
It seems that it can find and register the metamodel, but when it tries to find the template
it cannot find anything. The paths should be ok, since they can work with the previous oaw version.

Someone have any idea what can be wrong ?

Cheers,

Carmen

Re: Problem with XPAND2 generator after migration to mwe [message #512912 is a reply to message #512909] Mon, 08 February 2010 10:54 Go to previous messageGo to next message
Carmen  is currently offline Carmen Friend
Messages: 9
Registered: February 2010
Junior Member
Sorry, I forgot to say that a.am is an xmi file. And the xpand file is quite simple:

«IMPORT amm»

«DEFINE Root FOR DecisionModel»

«FILE "hello.txt"»
hello
«ENDFILE»

«ENDDEFINE»


Thank you!

[Updated on: Mon, 08 February 2010 13:11]

Report message to a moderator

Re: Problem with XPAND2 generator after migration to mwe [message #512964 is a reply to message #512909] Mon, 08 February 2010 13:11 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Hi Carmen!

Your template definition is called "main", but your configuration invokes "example::example::Foo::Root FOR model". So it is likely that you have to change the configuration to
<expand value="example::example::Foo::main FOR model"/>

Kind regards,
~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Problem with XPAND2 generator after migration to mwe [message #512967 is a reply to message #512912] Mon, 08 February 2010 13:13 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
The workflow looks for a definition called 'Root'
(example::example::Foo::Root) but the Xpand templates contains a
defintiion 'main'.

Sven

Carmen schrieb:
> Sorry, I forgot to say that a.am is an xmi file. And the xpand file is
> quite simple:
>
> «IMPORT amm»
>
> «DEFINE main FOR DecisionModel»
>
> «FILE "hello.txt"»
> hello
> «ENDFILE»
>
> «ENDDEFINE»
>
>
> Thank you!


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de'
Re: Problem with XPAND2 generator after migration to mwe [message #512997 is a reply to message #512967] Mon, 08 February 2010 14:26 Go to previous messageGo to next message
Carmen  is currently offline Carmen Friend
Messages: 9
Registered: February 2010
Junior Member
Sorry, it was my mistake in the copy and paste with the window Embarrassed .

I have already changed ti Root, and I still got the same error. I started a new project from scratch, and still have the same error.

Re: Problem with XPAND2 generator after migration to mwe [message #513045 is a reply to message #512909] Mon, 08 February 2010 16:28 Go to previous messageGo to next message
Carmen  is currently offline Carmen Friend
Messages: 9
Registered: February 2010
Junior Member
Ok. I started again from scratch, and I think that maybe I know where is the problem, but no idea which is the solution.

In my case, I'm developping plugins, which contains the definition of the metamodel, and the plugins required to get the workflow and run. I run this eclipse application, and in the new eclipse window I define the worflow file (.mwe) and the .xpt file. I think that maybe is a problem with the classpath, since if my plugins and source code are in the first Eclipse application, in this second one, where I have the xpt and mwe file, maybe it cannot find the projects and the path to get to that files. In this sense, If I define a new plugin project inside this second eclipse application, the workflow runs without problems and I get the files.
Could be this an explanation? If this is the case, how can I do this?

I copy and paste again the workflow file, the expand file, the error, and the source code where I call to the workflowrunner. So, for clarifying, I developped
the metamodel, then I run it as a new Eclipse application (let's say window 2), and in window2 I create a new project where I have the workflow file
and the xpand file. And then, I have a button that I press in order to call Workflowrunner internally.

Workflow source code:
<?xml version="1.0"?>
<workflow>

<!-- load model and store it in slot 'model' -->
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="${model}" />
<modelSlot value="model" />
<firstElementOnly value="true"/>
</component>

<component id="generator" class="org.eclipse.xpand2.Generator">
<metaModel id="mm" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
<metaModelPackage value="myproject.zz.ZzPackage"/>
</metaModel>
<expand value="MyExample::myfc::main FOR model"/>
<outlet path="${outputFolder}/" />
</component>

</workflow>


Xpand file:

«IMPORT zz»

«DEFINE main FOR ZModel»
«FILE "hello.txt"»
hello
«ENDFILE»
«ENDDEFINE»

Error trace:

08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: ------------------------------------------------------------ --------------------------
08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: EMF Modeling Workflow Engine 0.7.2, Build v200908120417
08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: (c) 2005-2009 openarchitectureware.org and contributors
08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: ------------------------------------------------------------ --------------------------
08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: running workflow: file:/E:/Migration-Galileo/Workspaces/runtime-EclipseApplica tion/MyExample/mywkf.mwe
08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO:
08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
INFO: Reader: Loading model from file:/E:/Migration-Galileo/Workspaces/runtime-EclipseApplica tion/MyExample/MyExample.zz
08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
INFO: Generator(generator): generating 'MyExample::myfc::main FOR model' => E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/outpu/
08-feb-2010 16:36:55 org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflo wComponent invokeInternal
GRAVE: Error in Component generator of type org.eclipse.xpand2.Generator:
EvaluationException : No Definition 'MyExample::myfc::main for zz::ZModel' found!
[23,38] on line 1 'EXPAND MyExample::myfc::main FOR model'

08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner executeWorkflow
GRAVE: Workflow interrupted. Reason: No Definition 'MyExample::myfc::main for zz::ZModel' found!
08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner logIssues
GRAVE: [ERROR]: No Definition 'MyExample::myfc::main for zz::ZModel' found!(Element: EXPAND MyExample::myfc::main FOR model; Reported by: Generator(generator): generating 'MyExample::myfc::main FOR model' => E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/outpu/)

Activator.java

/**
* The action has been activated. The argument of the
* method represents the 'real' action sitting
* in the workbench UI.
* @see IWorkbenchWindowActionDelegate#run
*/
public void run(IAction action) {
Map<String,String> properties = new HashMap<String,String>();
Map<String,String> slotContents = new HashMap<String,String>();
File modelFile = new File(" E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/MyExample.zz ");

properties.put("model", modelFile.toURI().toString());
properties.put("outputFolder", " E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/outpu " );
WorkflowRunner w = new WorkflowRunner();



String wkf = " file:/E:/Migration-Galileo/Workspaces/runtime-EclipseApplica tion/MyExample/mywkf.mwe ";
w.run(wkf, new NullProgressMonitor(), properties, slotContents);
MessageDialog.openInformation(
window.getShell(),
"MyModel Editor",
modelFile.toURI().toString());
}



Thanks for the help"!
Re: Problem with XPAND2 generator after migration to mwe [message #513290 is a reply to message #513045] Tue, 09 February 2010 16:17 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Where is the Xpand template located?

Sven


Carmen schrieb:
> Ok. I started again from scratch, and I think that maybe I know where is
> the problem, but no idea which is the solution.
> In my case, I'm developping plugins, which contains the definition of
> the metamodel, and the plugins required to get the workflow and run. I
> run this eclipse application, and in the new eclipse window I define the
> worflow file (.mwe) and the .xpt file. I think that maybe is a problem
> with the classpath, since if my plugins and source code are in the first
> Eclipse application, in this second one, where I have the xpt and mwe
> file, maybe it cannot find the projects and the path to get to that
> files. In this sense, If I define a new plugin project inside this
> second eclipse application, the workflow runs without problems and I get
> the files.
> Could be this an explanation? If this is the case, how can I do this?
>
> I copy and paste again the workflow file, the expand file, the error,
> and the source code where I call to the workflowrunner. So, for
> clarifying, I developped the metamodel, then I run it as a new Eclipse
> application (let's say window 2), and in window2 I create a new project
> where I have the workflow file
> and the xpand file. And then, I have a button that I press in order to
> call Workflowrunner internally.
> Workflow source code:
> <?xml version="1.0"?>
> <workflow>
>
> <!-- load model and store it in slot 'model' -->
> <component class="org.eclipse.emf.mwe.utils.Reader">
> <uri value="${model}" />
> <modelSlot value="model" />
> <firstElementOnly value="true"/>
> </component>
>
> <component id="generator" class="org.eclipse.xpand2.Generator">
> <metaModel id="mm"
> class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
> <metaModelPackage value="myproject.zz.ZzPackage"/>
> </metaModel>
> <expand value="MyExample::myfc::main FOR model"/>
> <outlet path="${outputFolder}/" />
> </component>
>
> </workflow>
>
>
> Xpand file:
>
> «IMPORT zz»
>
> «DEFINE main FOR ZModel»
> «FILE "hello.txt"»
> hello
> «ENDFILE»
> «ENDDEFINE»
>
> Error trace:
>
> 08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: ------------------------------------------------------------
> --------------------------
> 08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: EMF Modeling Workflow Engine 0.7.2, Build v200908120417
> 08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: (c) 2005-2009 openarchitectureware.org and contributors
> 08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: ------------------------------------------------------------
> --------------------------
> 08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: running workflow:
> file:/E:/Migration-Galileo/Workspaces/runtime-EclipseApplica
> tion/MyExample/mywkf.mwe
> 08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: 08-feb-2010 16:36:55
> org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
> INFO: Reader: Loading model from
> file:/E:/Migration-Galileo/Workspaces/runtime-EclipseApplica
> tion/MyExample/MyExample.zz
> 08-feb-2010 16:36:55
> org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
> INFO: Generator(generator): generating 'MyExample::myfc::main FOR model'
> => E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M
> yExample/outpu/
> 08-feb-2010 16:36:55
> org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflo wComponent
> invokeInternal
> GRAVE: Error in Component generator of type
> org.eclipse.xpand2.Generator: EvaluationException : No Definition
> 'MyExample::myfc::main for zz::ZModel' found!
> [23,38] on line 1 'EXPAND MyExample::myfc::main FOR model'
>
> 08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner
> executeWorkflow
> GRAVE: Workflow interrupted. Reason: No Definition
> 'MyExample::myfc::main for zz::ZModel' found!
> 08-feb-2010 16:36:55 org.eclipse.emf.mwe.core.WorkflowRunner logIssues
> GRAVE: [ERROR]: No Definition 'MyExample::myfc::main for zz::ZModel'
> found!(Element: EXPAND MyExample::myfc::main FOR model; Reported by:
> Generator(generator): generating 'MyExample::myfc::main FOR model' =>
> E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M
> yExample/outpu/)
>
> Activator.java
>
> /**
> * The action has been activated. The argument of the
> * method represents the 'real' action sitting
> * in the workbench UI.
> * @see IWorkbenchWindowActionDelegate#run
> */
> public void run(IAction action) {
> Map<String,String> properties = new HashMap<String,String>();
> Map<String,String> slotContents = new HashMap<String,String>();
> File modelFile = new File("
> E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M
> yExample/MyExample.zz ");
>
> properties.put("model", modelFile.toURI().toString());
> properties.put("outputFolder", "
> E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M
> yExample/outpu " );
> WorkflowRunner w = new WorkflowRunner();
>
>
>
> String wkf = "
> file:/E:/Migration-Galileo/Workspaces/runtime-EclipseApplica
> tion/MyExample/mywkf.mwe ";
> w.run(wkf, new NullProgressMonitor(), properties, slotContents);
> MessageDialog.openInformation(
> window.getShell(),
> "MyModel Editor",
> modelFile.toURI().toString());
> }
>
>
>
> Thanks for the help"!
>


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: Problem with XPAND2 generator after migration to mwe [message #513410 is a reply to message #513045] Tue, 09 February 2010 05:51 Go to previous messageGo to next message
Volker Wegert is currently offline Volker WegertFriend
Messages: 182
Registered: July 2009
Senior Member
Carmen <carmen.alonso@esi.es> writes:
> In my case, I'm developping plugins, which contains the definition of the
> metamodel, and the plugins required to get the workflow and run. I run this
> eclipse application, and in the new eclipse window I define the worflow file
> (.mwe) and the .xpt file. I think that maybe is a problem with the
> classpath, since if my plugins and source code are in the first Eclipse
> application, in this second one, where I have the xpt and mwe file, maybe it
> cannot find the projects and the path to get to that files. In this sense,
> If I define a new plugin project inside this second eclipse application, the
> workflow runs without problems and I get the files. Could be this an
> explanation? If this is the case, how can I do this?

The "providing plug-in" (in your first Eclipse instance) needs to have the
model path in the exported classpath entries. The consuming plug-ins must
declare a dependency on the providing plug-in. The consuming plug-in does not
necessarily have to be a plug-in project in the PDE sense. Example: I'm
working on an editor/generator application that uses EMF files and calls the
generator transparently (without creating a plug-in project at runtime) to
create some output. But in this case, the "model plug-in" has to put the
models into its exported class path and the "generator plug-in" has to depend
on the model plug-in. Have you checked this?

> GRAVE: Error in Component generator of type org.eclipse.xpand2.Generator:
> EvaluationException : No Definition 'MyExample::myfc::main for zz::ZModel' found!
> [23,38] on line 1 'EXPAND MyExample::myfc::main FOR model'

Could you perhaps outline the directory structure (absolute paths to model and
XPand files)?

HTH
Volker


--
* Volker Wegert * http://www.volker-wegert.de/contact *
"INTEL inside" - The world's most widely used warning label.
Re: Problem with XPAND2 generator after migration to mwe [message #513597 is a reply to message #513410] Wed, 10 February 2010 16:36 Go to previous messageGo to next message
Carmen  is currently offline Carmen Friend
Messages: 9
Registered: February 2010
Junior Member
Dear Sven an Volker,

I will check the path in the exported classpath of the plugin, just in case, and I will let you know tomorrow. So, if I understand correctly, this can be done and it seems to be like a configuration problem, doesn't it?

Thanks for your help!

Carmen
Re: Problem with XPAND2 generator after migration to mwe [message #513792 is a reply to message #513597] Thu, 11 February 2010 10:44 Go to previous messageGo to next message
Carmen  is currently offline Carmen Friend
Messages: 9
Registered: February 2010
Junior Member
Hi,

I tried to add to the classpath, as you suggested, in the plugin definition of classpath in runtime the model, I copy all the model files into a folder
and then I just add this folder to the classpath in the runtime of the plugin, but I still get the same error.


It fails in this point
File: ExpandStatement.class        

   private void invokeDefinition(final String defName, final Object targetObj, final Object[] params, final Type[] paramTypes,
            XpandExecutionContext ctx) {
 final Type t = ctx.getType(targetObj);


final XpandDefinition def = ctx.findDefinition(defName, t, paramTypes);


--------


The return value of def is null. And in t_name is zz::ZModel

The outline of the folder structure is the following:

Absolute path:
E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/MyExample.zz
E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/outpu/mywkf.mwe
E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/myfc.xpt

Relative path:
Name_of_the_project/Name_of_the_file
MyExample/MyExample.zz
MyExample/mywkf.mwe
MyExample/myfc.xpt

I press a button that must call internally and load the workflowrunner in order to read the
workflow, and execute it.

And the error is again the same:
GRAVE: Error in Component generator of type
org.eclipse.xpand2.Generator: EvaluationException : No Definition
'MyExample::myfc::main for zz::ZModel' found!
[23,38] on line 1 'EXPAND MyExample::myfc::main FOR model'

And I do not why, but now I cannot see the output error in the standard output and neither in the error console
Is there any console that I can use to see the errors, instead of using the debug mode and looking with breakpoints?

Thank you !

[Updated on: Thu, 11 February 2010 10:48]

Report message to a moderator

Re: Problem with XPAND2 generator after migration to mwe [message #514100 is a reply to message #513792] Fri, 12 February 2010 12:29 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Hi Carmen,

please tell us where all the resource are located.
There are lot of different possibilities to start a workflow.
It seems that you're starting it from within a running bundle in Eclipse
but expect to have things from your workspace visible.

Sven


Carmen schrieb:
> Hi,
>
> I tried to add to the classpath, as you suggested, in the plugin
> definition of classpath in runtime the model, I copy all the model files
> into a folder
> and then I just add this folder to the classpath in the runtime of the
> plugin, but I still get the same error.
>
>
> It fails in this point
>
> File: ExpandStatement.class
> private void invokeDefinition(final String defName, final Object
> targetObj, final Object[] params, final Type[] paramTypes,
> XpandExecutionContext ctx) {
> Path: build.eclipse.org!not-for-mail
> From: "Syed Imran" <tjaan01@gmail.com>
> Newsgroups: eclipse.modeling.m2t
> Subject: [Xpand] Error in reading diagram files from GMF editor
> Date: Thu, 11 Feb 2010 14:19:18 -0000
> Organization: EclipseCorner
> Lines: 121
> Message-ID: <hl13la$hrh$1@build.eclipse.org>
> NNTP-Posting-Host: 4c139.ucc.ie
> X-Trace: build.eclipse.org 1265897962 18289 143.239.81.139 (11 Feb 2010
> 14:19:22 GMT)
> X-Complaints-To: news@build.eclipse.org
> NNTP-Posting-Date: Thu, 11 Feb 2010 14:19:22 +0000 (UTC)
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
> X-RFC2646: Format=Flowed; Original
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
> Xref: build.eclipse.org eclipse.modeling.m2t:2590
>
> Hi,
>
>
>
> When running workflow on the generated diagram files of EMF-GMF editor
> models I got this error.
>
> Any idea?? What should I do to solve it?
>
> I have already put 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'
> in classpath of my project but still the problem persist.
>
>
>
>
>
> 0 INFO WorkflowRunner -
> ------------------------------------------------------------ --------------------------
>
>
> 0 INFO WorkflowRunner - openArchitectureWare 4.3.1, Build
> 200905111041NGT
>
> 0 INFO WorkflowRunner - (c) 2005-2008 openarchitectureware.org
> and contributors
>
> 0 INFO WorkflowRunner -
> ------------------------------------------------------------ --------------------------
>
>
> 0 INFO WorkflowRunner - running workflow: workflow.oaw
>
> 0 INFO WorkflowRunner -
>
> 594 INFO CompositeComponent - XmiReader(xmiParser): file
> 'example.data_diagram' => slot 'model'
>
> 1266 ERROR WorkflowRunner -
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
> uri 'http://www.eclipse.org/gmf/runtime/1.0.2/notation' not found.
> (file:/E:/Eclipse_workspace/Bismillah_M2T/Data.generator/bin /example.data_diagram,
> 2, 309)
>
> org.openarchitectureware.workflow.ConfigurationException:
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
> uri 'http://www.eclipse.org/gmf/runtime/1.0.2/notation' not found.
> (file:/E:/Eclipse_workspace/Prac_M2T/Data.generator/bin/exam ple.data_diagram,
> 2, 309)
>
> at org.openarchitectureware.emf.XmiReader.invoke(XmiReader.java :139)
>
> at
> org.openarchitectureware.workflow.container.CompositeCompone nt.internalInvoke(CompositeComponent.java:129)
>
>
> at
> org.openarchitectureware.workflow.container.CompositeCompone nt.invoke(CompositeComponent.java:112)
>
>
> at
> org.openarchitectureware.workflow.WorkflowRunner.executeWork flow(WorkflowRunner.java:380)
>
>
> at
> org.openarchitectureware.workflow.WorkflowRunner.run(Workflo wRunner.java:261)
>
>
> at
> org.openarchitectureware.workflow.WorkflowRunner.main(Workfl owRunner.java:213)
>
>
> Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
> Package with uri 'http://www.eclipse.org/gmf/runtime/1.0.2/notation' not
> found.
> (file:/E:/Eclipse_workspace/Prac_M2T/Data.generator/bin/exam ple.data_diagram,
> 2, 309)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)
>
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:191)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1494)
>
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1282)
>
>
> at org.openarchitectureware.emf.XmiReader.invoke(XmiReader.java :136)
>
> ... 5 more
>
> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
> with uri 'http://www.eclipse.org/gmf/runtime/1.0.2/notation' not found.
> (file:/E:/Eclipse_workspace/Prac_M2T/Data.generator/bin/exam ple.data_diagram,
> 2, 309)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
>
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
>
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
>
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
>
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>
> ... 9 more
>
>


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: Problem with XPAND2 generator after migration to mwe [message #514262 is a reply to message #513792] Fri, 12 February 2010 05:51 Go to previous messageGo to next message
Volker Wegert is currently offline Volker WegertFriend
Messages: 182
Registered: July 2009
Senior Member
Hello.

Carmen <carmen.alonso@esi.es> writes:
> The outline of the folder structure is the following:
>
> Absolute path:
> E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/MyExample.zz
> E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/outpu/
> E:/Migration-Galileo/Workspaces/runtime-EclipseApplication/M yExample/myfc.xpt
>
> Relative path:
> Name_of_the_project/Name_of_the_file
> MyExample/MyExample.zz
> MyExample/mywkf.mwe
> MyExample/myfc.xpt
>
> I press a button that must call internally and load the workflowrunner in order to read the
> workflow, and execute it.
>
> And the error is again the same:
> GRAVE: Error in Component generator of type
> org.eclipse.xpand2.Generator: EvaluationException : No Definition
> 'MyExample::myfc::main for zz::ZModel' found!
> [23,38] on line 1 'EXPAND MyExample::myfc::main FOR model'

Which folder is in the classpath? The project root or MyExample? If it is
MyExample, then I'd say you have to invoke myfc::main instead of
MyExample::myfc::main. Just guessing, though. Could you upload an example
somewhere?

Volker

--
* Volker Wegert * http://www.volker-wegert.de/contact *
"What're quantum mechanics?" - "I don't know. People who repair quantums, I
suppose." (Terry Pratchett, Eric)
Re: Problem with XPAND2 generator after migration to mwe [message #514655 is a reply to message #514262] Tue, 16 February 2010 09:07 Go to previous messageGo to next message
Carmen  is currently offline Carmen Friend
Messages: 9
Registered: February 2010
Junior Member
Hi,

I tried the thing of the paths in the workfile and it is not the problem. And yes, my plugin is calling the workflow that is in the new project of the "new workspace" (not in the generator plugin) and in that project it is also the xpt file.

I found this entry in the oaw official webpage
http://www.openarchitectureware.org/article.php/howto_cartri dge_as_plugin

And there is a part that is exactly my problem:" Accessing resources from projects in the workspace"

My plugin needs to access/load the project in the workspace project from my plugin??. I guess that I need to define my own class loader in the same way, do I? Is the information there still valid for the new version of oaw, or do I have any other way of doing this?

Thanks a lot!

[Updated on: Tue, 16 February 2010 15:12]

Report message to a moderator

Re: Problem with XPAND2 generator after migration to mwe [message #514795 is a reply to message #512909] Tue, 16 February 2010 16:33 Go to previous messageGo to next message
Carmen  is currently offline Carmen Friend
Messages: 9
Registered: February 2010
Junior Member
Hi guys

I have no more ideas so I let you the project for you to download in this link
http://193.146.186.150/Migration-problem.zip

There is a readme file where I explain how I have the environment.

Hope this would be more helpful with this than explaining myself Confused


Thanks a lot!
Re: Problem with XPAND2 generator after migration to mwe [message #514962 is a reply to message #512909] Wed, 17 February 2010 10:55 Go to previous message
Carmen  is currently offline Carmen Friend
Messages: 9
Registered: February 2010
Junior Member
Sorry,

I forget to remove one dependency in the es.esi.prueba.editor, since I was trying to do some tests with my original class (but it doesn't work). So, you must remove the es.esi.plum.wkf dependency. (Sorry for this mistake!) And if you remove it, you can run it and you will see that the error is still persists.

I have also followed the trace and it seems that resource is all the time null, and due to this, it cannot load the things it needs. But no clue on what is going on ....

So, I will wait for your answer

Previous Topic:Topcased UML Profiles and Spring Cartridge
Next Topic:Any way to generate only one file?
Goto Forum:
  


Current Time: Mon Dec 30 15:56:07 GMT 2024

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

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

Back to the top