Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [ANT] standalone workflow exception
[ANT] standalone workflow exception [message #1409763] Mon, 18 August 2014 23:50 Go to next message
abdush mohd is currently offline abdush mohdFriend
Messages: 35
Registered: April 2014
Member
Hi,

I would like to run my transformation workflow from a batch file. I downloaded the ant-emf jar file as explained in this example:

http://http://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.examples.workflow.standalone/

When I run ant from cmd line, the epsilon tasks run fine until I get the following exception in the last flock task:


EXCEPTION: Could not create in the migrated model a model element of type: StateMachine
[epsilon.flock - sc2umlStatechart.mig] Cannot find meta-class 'null' in model 'uml_statechart'
[epsilon.flock - sc2umlStatechart.mig]  at org.eclipse.epsilon.flock.context.EquivalenceEstablishmentContext$EquivalentFactory.createModelElementInMig
ratedModel(EquivalenceEstablishmentContext.java:57)
....


I have no clue what could be the reason for this. The workflow build file just works fine from Eclipse. I tried both metamodelfile or metamodeluri for loadModel task. Any suggestion?

Thanks
Abdu
Re: [ANT] standalone workflow exception [message #1409947 is a reply to message #1409763] Tue, 19 August 2014 11:31 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Abdu,

Could you please post a minimal example I can use to investigate this?

Cheers,
Dimitris
Re: [ANT] standalone workflow exception [message #1410146 is a reply to message #1409947] Wed, 20 August 2014 00:28 Go to previous messageGo to next message
abdush mohd is currently offline abdush mohdFriend
Messages: 35
Registered: April 2014
Member
Hi Dimitris,

I am afraid that the only minimal example possible is the whole project as it is a chain of transformations.
Can I send it to you?

Regards
Abdu
Re: [ANT] standalone workflow exception [message #1410673 is a reply to message #1410146] Thu, 21 August 2014 10:58 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Abdu,

Smaller examples are always preferable (see [1] for a more detailed discussion) but I'm happy to have a look at the complete chain if isolating the interesting part is not possible.

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: [ANT] standalone workflow exception [message #1410764 is a reply to message #1410673] Thu, 21 August 2014 15:01 Go to previous messageGo to next message
abdush mohd is currently offline abdush mohdFriend
Messages: 35
Registered: April 2014
Member
Hi Dimitris,

I'll try to minimize it. The flock module with problem uses variables passed from two previous modules. I'll see if this has no effect and isolate them.

Thanks
Abdu
Re: [ANT] standalone workflow exception [message #1410818 is a reply to message #1410764] Thu, 21 August 2014 17:55 Go to previous messageGo to next message
abdush mohd is currently offline abdush mohdFriend
Messages: 35
Registered: April 2014
Member
Hi Dimitris,

I've attached a minimal example for this. Now the workflow contains only one flock module. I've commented out the code part in the flock module which uses passed variables.

When I run the "run.bat" file I get the error mentioned in the first post. If I run from Eclipse using the launch file provided, it works.

The ant-emf jar I use is the interim version which includes the tasks.xml definitions.

Thanks
Abdu
Re: [ANT] standalone workflow exception [message #1411087 is a reply to message #1410818] Fri, 22 August 2014 10:57 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Abdu,

This was a tricky one. The UML metamodel is a bit more "special" than regular Ecore metamodels. As such, Epsilon provides a dedicated driver for loading UML models [1]. To make use of the UML driver you'd need to replace your epsilon.emf.loadModel task with the following and add the org.eclipse.epsilon.emc.uml plugin JAR, and all the relevant org.eclipse.uml.* plugin JARS (I added all of them just to be on the safe side) to your lib folder. Unfortunately, this will not work with the current version of the Epsilon JARs/plugins, but it should work fine with 1.2 which will be available shortly. Apologies for any inconvenience caused.

<epsilon.loadModel name="uml_statechart" type="UML" impl="org.eclipse.epsilon.emc.uml.UmlModel">
<parameter name="modelFile" value="${outputfile_umlsc}"/>
<parameter name="readOnLoad" value="false"/>
</epsilon.loadModel>

Cheers,
Dimitris

[1] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/plugins/org.eclipse.epsilon.emc.uml/src/org/eclipse/epsilon/emc/uml/UmlModel.java
Re: [ANT] standalone workflow exception [message #1411143 is a reply to message #1411087] Fri, 22 August 2014 13:52 Go to previous messageGo to next message
abdush mohd is currently offline abdush mohdFriend
Messages: 35
Registered: April 2014
Member
Hi Dimitris,

No issues, Thanks really for your time. Looking forward for the next release Smile .

I am just wondering if it works from Eclipse, should it not also work when adding "all" those needed jars into the lib folder?

Thanks
Abdu
Re: [ANT] standalone workflow exception [message #1411199 is a reply to message #1411143] Fri, 22 August 2014 16:43 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Abdu,

I suspect that when the UML plugin is loaded by Eclipse it does its magic - which is not the case when it's loaded by the Java classloader.

Cheers,
Dimitris
Re: [ANT] standalone workflow exception [message #1411285 is a reply to message #1411199] Fri, 22 August 2014 22:30 Go to previous message
abdush mohd is currently offline abdush mohdFriend
Messages: 35
Registered: April 2014
Member
Indeed it has its magic Very Happy . Many Thanks Dimitris.
Previous Topic:Is there a possibilty to set Ecore Resource options in Epsilon?
Next Topic:[EUnit] ignore attributes in models comparison
Goto Forum:
  


Current Time: Fri Apr 26 22:51:02 GMT 2024

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

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

Back to the top