Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/895516/#msg_895516
I have worked with atl for a while and I am coming to something productive at the end. I have completed the transformation after a long ride and now I wanted to launch the atl transformation from Java project.
Inorder to do so I want to first creat the ATL Plugin and use it in java project.
However, when I run the ATL Plugin before i use it in the java project, then I get an error says org.eclipse.m2m.atl.core.ATLCoreException feature 'literal' not found as it is shown below.
org.eclipse.m2m.atl.core.ATLCoreException: Error loading Meta/MetaModel.ecore: Feature 'literal' not found. (Meta/MetaModel.ecore, 663, 90)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:70)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:84)
at Export.a2b.loadModels(a2b.java:113)
at Export.a2b.main(a2b.java:76)
line 663 is an eliteral
I have made some test to check what the cause for this problem is and i find out that the eliteral from the metamodel enumeration are the sources of the error. However, my metamodel have lots of enumerations and I need a solution to handle the enumeration in the atl plugin.
I have series of transformations and the once with out enumeration are working fine.
I have tried to find from the forum if there is someone with similar problem however, i have found no related error and i was wondering if anyone of you know about it. Or if it is a bug in the ATL plug in.
I am using Eclipse 3.6.0 Helios Release (3.6.0) , ATL 3.1.1 and EMF 2.6.1 and I want to create ATL plugins that that I can run the atl transformation programmatically by calling it from Java.
I thank everyone in advance for the solution you will provide me.
kind regards,
Emwedish]]>Emwedish Endargachew2012-07-13T11:13:11-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/903913/#msg_903913
Does the Ecore metamodel you're mentioning load correctly when running manually the ATL transformation?
Could you also send the metamodel you're using?
It seems that the problem occurs when loading a structural feature (i.e. attribute or reference) named "literal" in your metamodel...
Best regards,
Hugo
]]>Hugo Bruneliere2012-08-27T08:57:43-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/905049/#msg_905049
Thanks a lot for checking out my question.
The metamodel loads correctly on manual run. However when it comes to the ATL Plugin, it generates an error. And the deadline for my submission is in a week.
If you don't mind, I will prefer to attach the meta-model to your email.
kind regards,
Emwedish]]>Emwedish Endargachew2012-08-29T15:35:02-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/905059/#msg_905059
I've taken a look to your metamodel and I can open/browse it without errors in any Ecore editor.
Could you also provide me the full stack trace you got when running the plugin?
Best regards,
Hugo]]>Hugo Bruneliere2012-08-29T15:57:50-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/905409/#msg_905409
Thanks for the fast reply.
I have tried it using two methods
(
1. Using Java launch from http://wiki.eclipse.org/ATL_Howtos
2.the ATL Plugin method). and i get similar errors. Look below.
)
When using ATL Plugin, i get the following error (used Eclipse Helios Release 3.6.0)
org.eclipse.m2m.atl.core.ATLCoreException: Error loading Meta/EAST-ADL.ecore: Feature 'literal' not found. (Meta/EAST-ADL.ecore, 663, 90)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:70)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:84)
at Export.EAXML2XML.loadModels(EAXML2XML.java:111)
at transformation.Transformation$9.actionPerformed(Transformation.java:580)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.eclipse.emf.common.util.WrappedException: Feature 'literal' not found. (Meta/EAST-ADL.ecore, 663, 90)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:268)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:349)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:65)
... 28 more
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at transformation.Transformation$9.actionPerformed(Transformation.java:567)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
kind regards,
Emwedish
]]>Emwedish Endargachew2012-08-30T10:39:36-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/905544/#msg_905544
I've tried to handle a bit your metamodel with the latest ATL version (for Juno) and it seems to work well apparently.
Have you also tried to run the same transformation under Eclipse Juno (or at least previous Indigo)?
Best regards,
Hugo
]]>Hugo Bruneliere2012-08-30T15:45:05-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/905564/#msg_905564
Thanks a lot!
No i have not tried to run it on Indigo or Juno. However, when I run it using ATL3.1.1 in eclipse Europa, and ATL3.1.1 in Eclipse 3.6.0 Helios i get this error. However, when i use the ATL configuration to run the atl transformation in many different versions of eclipse including AMMAPrototypeEclipse, and ATL2.0 it works fine. The reason why I am now trying to find the latest ATL is that because I want to programmtically launch my application.
I will try to run the Juno you suggest, but can I ask how you tried to run the metamodel in Juno. Did you write a transformation and run the ATL launch configuration or you tried the ATL plugin.
So to make it clear I want to launch an ATL transformation using java:
1. I want to launch it using java or another language which can support GUI
2. want to use the inject and extract as my models are available in xml format
so would you please send me the link for complete eclipse which have all the libraries. The main challenging task for me while working with ATL transformation is,
1. Launching it programmatically including the support for inject and extract an XML file as my input is available in xml.
Do you think Juno will help or if you have the complete Eclipse version with all the libraries that can enable me launching the transformation programmatically, would you please be kind and send me the zip file?
I really appreciate for your help,
Kind regards,
Emwedish
]]>Emwedish Endargachew2012-08-30T16:35:15-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/905881/#msg_905881
I've written a simple ATL transformation taking as input model the Ecore metamodel you sent me, to make sure that it can be loaded properly with ATL.
I've also tried (successfully) to register it in the EMF Registry, to ensure that EMF can also load it correctly.
I haven't faced any issue with your Ecore metamodel while doing these two actions.
Note that this ATL API is included by default in all latest ATL releases (no additional installing required).
I hope this helps.
Best regards,
Hugo
]]>Hugo Bruneliere2012-08-31T08:52:34-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/905987/#msg_905987
Thanks so much, the Juno suggestion was great. I have never heard of Juno before. Even though I was using ATL 3.1.1 with Helios 3.6, I could not get it working. and at last i got that weird error message. Now I use Juno 4.2 with ATL 3.1.1 and when i run the ATL plugin with the same Meta-model it runs very well.
You really did great job and thanks for taking time and looking at my problem.
I have not tried the transformation class you send me now as I already have started working with the ATL plugin. but it looks shorter and i might try it soon.
Well, I have one more question for you and i hope you will help me. I am trying to inject an xml model and extract the output model into xml model as well. But when i tried the instructions in http://wiki.eclipse.org/ATL_Howtos it did not work for me. Do you have any link or recommendation for the Juno 4.2 and ATL 3.1.1.
Thanks a lot!
kind regards,
Emwedish ]]>Emwedish Endargachew2012-08-31T12:23:34-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/906005/#msg_906005
http://wiki.eclipse.org/ATL_Howtos#How_can_I_handle_arbitrary_XML_documents.
I've just completed this part of the Wiki with more useful information!
Best regards,
Hugo]]>Hugo Bruneliere2012-08-31T12:56:30-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/906024/#msg_906024
reading the Howtos now.
Will update you.
kind regards,
Emwedish]]>Emwedish Endargachew2012-08-31T13:29:59-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/906040/#msg_906040
I have an error while running the example you wrote:
I have org.eclipse.core.runtime3.8 but does not work.
can you tell me which library version you used for this one?
thanks
Emwedish]]>Emwedish Endargachew2012-08-31T13:57:44-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/906051/#msg_906051
Your error should come from something else (cf. the first error from your stack trace).
Best regards,
Hugo]]>Hugo Bruneliere2012-08-31T14:22:45-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/908517/#msg_908517
Thanks a lot. Everything works fine now.
Cheers!
]]>Emwedish Endargachew2012-09-05T14:06:35-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/913459/#msg_913459
I'm trying to use the sugested code, however I'm getting the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/emf/ecore/resource/ResourceSet
at atl.RunTransfoJava1.main(RunTransfoJava1.java:41)
Caused by: java.lang.ClassNotFoundException: org.eclipse.emf.ecore.resource.ResourceSet
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
What I need to do? or what I'm doing wrong?
]]>Fernanda R.F.2012-09-15T18:10:33-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/915509/#msg_915509
It seems that you're missing the EMF ResourceSet class in your class path.
You should check that you've correctly set it up.
Best regards,
Hugo
]]>Hugo Bruneliere2012-09-17T12:40:32-00:00Re: ATL Plugin Feature 'literal' not found error
https://www.eclipse.org/forums/index.php/mv/msg/367453/915528/#msg_915528
]]>Fernanda R.F.2012-09-17T13:16:28-00:00