EOL stansalone problem [message #1771894] |
Thu, 31 August 2017 19:49 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi,
When I want to run the below code via standalone, I have an error. It is run via EOL configuration without any error.
I transform Families2Persons transformation to its equivalent model with Haetae. And I navigated this model namely ETL via eol program.
the part of code that caused the problem:
for (preblock in ETL!ETLModule.allInstances()-> first().preBlocks.body.statements)
{
}
error:
Called feature preBlocks on undefined object
at (bundleresource://2405.fwk254513404/org/eclipse/epsilon/examples/standalone/eol/Demo.eol@16:18-16:66)
at (bundleresource://2405.fwk254513404/org/eclipse/epsilon/examples/standalone/eol/Demo.eol@16:18-16:71)
at (bundleresource://2405.fwk254513404/org/eclipse/epsilon/examples/standalone/eol/Demo.eol@16:18-16:82)
at (bundleresource://2405.fwk254513404/org/eclipse/epsilon/examples/standalone/eol/Demo.eol@16:1-22:2)
at org.eclipse.epsilon.eol.dom.PropertyCallExpression.execute(PropertyCallExpression.java:46)
at org.eclipse.epsilon.eol.dom.PropertyCallExpression.execute(PropertyCallExpression.java:40)
at org.eclipse.epsilon.eol.dom.PropertyCallExpression.execute(PropertyCallExpression.java:72)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:109)
at org.eclipse.epsilon.eol.dom.PropertyCallExpression.execute(PropertyCallExpression.java:39)
at org.eclipse.epsilon.eol.dom.PropertyCallExpression.execute(PropertyCallExpression.java:72)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:109)
at org.eclipse.epsilon.eol.dom.PropertyCallExpression.execute(PropertyCallExpression.java:39)
at org.eclipse.epsilon.eol.dom.PropertyCallExpression.execute(PropertyCallExpression.java:72)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:109)
at org.eclipse.epsilon.eol.dom.ForStatement.execute(ForStatement.java:45)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:109)
at org.eclipse.epsilon.eol.dom.StatementBlock.execute(StatementBlock.java:43)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:109)
at org.eclipse.epsilon.eol.EolModule.execute(EolModule.java:55)
at org.eclipse.epsilon.examples.standalone.EpsilonStandaloneExample.execute(EpsilonStandaloneExample.java:83)
at org.eclipse.epsilon.examples.standalone.EpsilonStandaloneExample.execute(EpsilonStandaloneExample.java:71)
.
The model is attached.
I have also statement such as below. Although it doesn't have an error, it doesn't go to the inner of for block.
for (tr in ETL!TransformationRule)
{
}
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Thu, 31 August 2017 20:54] Report message to a moderator
|
|
|
Re: EOL stansalone problem [message #1771935 is a reply to message #1771894] |
Fri, 01 September 2017 10:12 |
|
Hi,
On my Eclipse it generates some parsing problems:
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@de646d5 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@79cbc176 (name: OperationDefinition) (instanceClassName: null) (abstract: false, interface: false))' is not legal. (platform:/resource/emf.test/model/Families2Persons.etl.model, 12, 120)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
at org.eclipse.emf.ecore.presentation.EcoreEditor.createModelGen(EcoreEditor.java:1173)
at org.eclipse.epsilon.dt.exeed.ExeedEditor.createPages(ExeedEditor.java:311)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:363)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:150)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:99)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:340)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Did you change Haetae source code or its metamodel in your local copy?
Cheers,
Will
Research Associate
Department of Computer Science
University of York
|
|
|
|
|
|
Re: EOL stansalone problem [message #1771943 is a reply to message #1771939] |
Fri, 01 September 2017 11:43 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
The eol program which has the Families2Persons.etl.model as its input model runs well via run configuration. However, when I try to run it via standalone, it has an error.
I created the model via the below statement in standalone in which model variable contains such a "/FamiliestoPersons/Families2Persons.etl.model" string:
models.add(createEmfModelByURI("ETL", model, "http://www.eclipse.org/epsilon/etl", true, false));
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Fri, 01 September 2017 11:49] Report message to a moderator
|
|
|
|
|
Re: EOL stansalone problem [message #1771951 is a reply to message #1771945] |
Fri, 01 September 2017 12:46 |
|
Hi, I cannot reproduce your error since I cannot parse the model you provided.
Could you try parse the model from the etl again and post it and we'll pick it up from here.
Cheers,
Will
Research Associate
Department of Computer Science
University of York
|
|
|
|
|
|
|
|
|
|
Re: EOL stansalone problem [message #1772024 is a reply to message #1772009] |
Mon, 04 September 2017 08:56 |
Athanasios Zolotas Messages: 52 Registered: November 2016 Location: York |
Member |
|
|
Hi,
Yes, Haetae is not compatible with 1.4 however, I actually tried to create a minimal EOL standalone application that doesn't use any aspect of Haetae except the ETL.ecore and EOL.ecore metamodels. But your provided model still has errors. Anyway, I spend some time trying that in Epsilon 1.3 as well to confirm my understanding and indeed the same problem exists: your model is not parsing at my side (I tried all the versions you provided to far). And I think that you receive the exception you posted in your last message because of that. I actually receive the same exception when I use your model.
So, the importand bits:
1) As soon as you're loading an EMF model then you have to register the metamodels this model conforms to. So, if your model conforms to the ETL metamodel then you have to register it. If your model conforms to the Person metamodel then you have to register it, etc. Otherwise, Epsilon won't be able to execute the standalone program. The fact that you don't get the error when you run in a new Eclipse instance might be because Haetae registers the metamodels for you in one of its plugins that are loaded when the new Eclipse instance loads.
2) I created another example model, as your model doesn't work for me. Your demo.eol executes fine on this model. I actually changed it a bit (see below) as soon as my model doesn't have body statements***.
This is my Demo.eol
"hi".println();
var sys = Native("java.lang.System") ;
var startTime = sys.currentTimeMillis();
startTime.println("start ... ");
var package = new Ecore!EPackage;
package.name = 'Target';
var EolPrinter : new Native("org.eclipse.epsilon.eol.visitor.printer.impl.EolPrinter");
/* pre */
for (preblock in ETL!ETLModule.allInstances()-> first().preBlocks)
{
for (pre in preblock)
{
pre.println();
}
}
"bye".println();
And this is what it prints:
hi
start ... 1504514902120
org.eclipse.emf.ecore.impl.DynamicEObjectImpl@14a4e18 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@12da18f (name: NamedBlock) (instanceClassName: null) (abstract: false, interface: false))
bye
Which is a valid output based on my model input: I have one Transformation Rule which has one preblock. The script enters in both loops and prints the preblock.
What I would suggest is try my model that I attach and verify that it works for you.
*** When I try to create a new model that conforms to the ETL.ecore provided in Haetae I get a (not very descriptive) NPE. As a result I cannot access the properties to create body statements. I don't know if you get this as well. My basic model still works though. In any case, I will ping William, the main developer of Haetae, to ask him about that and I will let you know. I am not familiar with Haetae at all and it might be something that I am doing wrong.
-
Attachment: thanos.model
(Size: 0.31KB, Downloaded 239 times)
|
|
|
|
Re: EOL stansalone problem [message #1772042 is a reply to message #1772009] |
Mon, 04 September 2017 14:26 |
|
Hi,
We have spotted some problems with the ETL.ecore, introduced probably in the last refactor phase. It has now been rectified.
I have attached the ETL model generated from your transformation. Please give it another try.
Please also update the changes from haetae repository.
Cheers,
Will
Research Associate
Department of Computer Science
University of York
|
|
|
|
Re: EOL stansalone problem [message #1772121 is a reply to message #1772042] |
Tue, 05 September 2017 18:32 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
I am sorry when I run it via main method it works well. However, when I run it via popupMenu in the new eclipse application, It has a below error:
Undefined variable, type or model: 'ETL!ETLModule'
when I remove the lines that register etl metamodel, I have the below error:
Called feature preBlocks on undefined object
I also downloaded a new eclipse with epsilon 1.3 and test in it but the result doesn't change. (I imported haetae plugins in the first eclipse)
As another question, I don't know how can I get xmi model from etl transformation with haetae. When I right click on etl file I saw Epsilon Haetae menu. but it generates old .model file.
I also tried to redownload the haetae from https://github.com/epsilonlabs/haetae today. but the new download has errors as seen in the attached picture.
Thanks for your time,
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Tue, 05 September 2017 18:34] Report message to a moderator
|
|
|
|
Re: EOL stansalone problem [message #1772126 is a reply to message #1772123] |
Tue, 05 September 2017 20:16 |
|
Hi, I have rebuilt the update site, hopefully this solves your problem - although I would highly recommend you to use the source code instead of directly installing from the update site
Cheers,
Will
Research Associate
Department of Computer Science
University of York
[Updated on: Tue, 05 September 2017 20:20] Report message to a moderator
|
|
|
|
Re: EOL stansalone problem [message #1772155 is a reply to message #1772142] |
Wed, 06 September 2017 07:52 |
|
Hi,
Did you pull from git again when I updated the update site? I have changed some source code along with it.
Cheers,
Will
Research Associate
Department of Computer Science
University of York
|
|
|
|
|
|
|
Re: EOL stansalone problem [message #1772217 is a reply to message #1772215] |
Wed, 06 September 2017 20:03 |
|
Hi just had a look at your Demo.eol.
Could you explain to me, when you run it with EOL run configuration file, how many models you created and what metamodels they conform to?
Research Associate
Department of Computer Science
University of York
|
|
|
|
|
Re: EOL stansalone problem [message #1772271 is a reply to message #1772262] |
Thu, 07 September 2017 10:28 |
|
Hi there, I have figured out what the problem is:
When you configure a model and specify the .model file in the run configuration, it shows what metamodels it conform to, but the metamodels are not actually in the EPackage registry. I have made some changes to the plug-ins so that these metamodels are registered when you run a new Eclipse instance.
Your code should work now, please update your source from github.
Cheers,
Will
Research Associate
Department of Computer Science
University of York
|
|
|
|
Re: EOL stansalone problem [message #1772350 is a reply to message #1772329] |
Fri, 08 September 2017 10:25 |
|
Hi, can you specify your environment when you mean "standalone"?
1. are you running a new Eclipse instance with all the plug-ins from haetae?
2. are EOL and ETL metamodels in the EPackage Registry? (Window->show view->other->EPackage Registry)
3. are you sure you have the metamodels in the model repository when you run Epsilon stand alone?
Research Associate
Department of Computer Science
University of York
|
|
|
Re: EOL stansalone problem [message #1772364 is a reply to message #1772350] |
Fri, 08 September 2017 11:29 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi,
I imported haetae source from git clone https://github.com/epsilonlabs/haetae. I imported my plugin project (which used epsilon standalone to run the EOL program) to this eclipse as well. Then I run a new instance of eclipse via run configuration. In the new eclipse, I right clicked on the file and clicked on my plugin menu item in the popup menu. I browse the etl transformation model and its input and output metamodels. then clicked the button to run the eol program via standalone. It says that error.
1. Yes, I am.
2,3. I have these metamodels in the EPackage Registry of the second eclipse but I don't have them on the first eclipse. I also tried to register these metamodels manually (in the first eclipse) by right clicking on ETL.ecore and EOL.ecore file of the imported haetae source. but it doesn't take effect. Although they are already in the EPackage Registry.
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Fri, 08 September 2017 11:30] Report message to a moderator
|
|
|
Re: EOL stansalone problem [message #1772429 is a reply to message #1772364] |
Sat, 09 September 2017 07:25 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
when I remove the below line of my code it works well:
models.add(createEmfMetaModelByURI("ETL", "ETL_MM", "http://www.eclipse.org/epsilon/etl"));
protected EmfMetaModel createEmfMetaModelByURI(String name, String Aliases, String metamodel)
throws EolModelLoadingException, URISyntaxException {
EmfMetaModel emfMetaModel = new EmfMetaModel();
// emfMetaModel.getAliases().add(Aliases);
StringProperties properties = new StringProperties();
properties.put(EmfMetaModel.PROPERTY_NAME, name);
properties.put(EmfMetaModel.PROPERTY_METAMODEL_URI,
metamodel);
properties.put(EmfMetaModel.PROPERTY_ALIASES,
Aliases);
emfMetaModel.load(properties, (IRelativePathResolver) null);
return emfMetaModel;
}
It seems set aliases not works for me. It is not used in my code and I remove it.
Many thanks for your time and sorry for any inconvenience.
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Sat, 09 September 2017 07:39] Report message to a moderator
|
|
|
|
|
|
Re: EOL stansalone problem [message #1774357 is a reply to message #1772837] |
Fri, 13 October 2017 08:42 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi,
I have another question. It is not related to haetae.
When I run the eol program via eol run configuration, I don't have any error and the program works well. But when I run it via standalone sometimes I have the error attached, another times the execution pauses in 'Using Mandatory effective Metamodel' message.
I tried to add all the required libraries to myPlugin dependencies, I don't know how could I succeed.
I provide a minimal example. I have installed ATL.
First I import all of the plugins in the "anatlyzer" file to eclipse. Then I import "myPlugin" and "MyChecker" plugins to the eclipse as well. After that I run the new instance of eclipse. In the new eclipse I import "Tree2Graph" project. I right clicked on "Tree2Graph.etl" file and select "myPlugin".
In the EolStandaloeExample.java file of "myPlugin", the addresses assigned to "inputMetaModel" and "outputMetamodel" variables related to my PC.
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Sun, 15 October 2017 05:17] Report message to a moderator
|
|
|
|
Re: EOL stansalone problem [message #1775020 is a reply to message #1774454] |
Mon, 23 October 2017 14:19 |
|
Are you trying to invoke ATL from within the ETL? It is unclear what you are trying to achieve, and to me is looks like a class path/dependency problem.
I can only theorise that you will probably also wan to invoke ATL programatically. If so, the ATL forum is better for that. There is a programatic ATL luncher here:
https://github.com/guana/ATLauncher
Cheers,
Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
|
|
|
Re: EOL stansalone problem [message #1775030 is a reply to message #1775020] |
Mon, 23 October 2017 17:42 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
thanks for your reply.
I want to pass ATLExpression model to anatlyzer plugin via eol (the anatlyzer detemines whether the expression is satisfiable). When I run the eol program via eol run configuration it doesn't have any error. When I run it via eol standalone, usually it has the error or pauses in 'Using Mandatory effective Metamodel' message.
I don't want to run ATL programatically.
In the eol program, First I pass ATLExpression model to MyChecker plugin. In ATLtoAnatlyzer class of MyChecker plugin, the ATLExpression is transformed to Anatlyzer-based ATLExpression. In ETLChecker class of this plugin, I pass Anatlyzer-based ATLExpression to anatlyzer tool in order to get the result of satisfaction.
I removed unused dependencies and also removed unused models from eol launch and attached the minimal example again.
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Mon, 23 October 2017 19:18] Report message to a moderator
|
|
|
Re: EOL stansalone problem [message #1775304 is a reply to message #1775030] |
Fri, 27 October 2017 12:00 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
When I open an atl file in the editor and run the program, it doesn't have the last error but eclipse is crashed only in mac os.
According to error log, It seems the eclipse is crashed because of "libswt-cocoa-4530.jnilib". Do you know what should I do?
I have an "OS X EI captain", I downloaded eclipse mars from epsilon site (I want to use epsilon 1.3). Does higher version of eclipse solve my problem? Which another "eclipse modeling" can I download? I see https://www.eclipse.org/modeling/downloads/ but I cannot find the suitable version of it for my OS, also I see other platforms link.
Does epsilon1.3 support, the newer version of eclipse?
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Fri, 27 October 2017 17:31] Report message to a moderator
|
|
|