Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL Plugin Feature 'literal' not found error(When I try to run atl plugin with MM having enumerations I am getting org.eclipse.m2m.atl.core.ATLCoreException error)
ATL Plugin Feature 'literal' not found error [message #895516] Fri, 13 July 2012 11:13 Go to next message
Emwedish Endargachew is currently offline Emwedish EndargachewFriend
Messages: 27
Registered: April 2011
Junior Member
Dear All,

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

[Updated on: Fri, 13 July 2012 11:21]

Report message to a moderator

Re: ATL Plugin Feature 'literal' not found error [message #903913 is a reply to message #895516] Mon, 27 August 2012 08:57 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
Hello,

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 Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: ATL Plugin Feature 'literal' not found error [message #905049 is a reply to message #903913] Wed, 29 August 2012 15:35 Go to previous messageGo to next message
Emwedish Endargachew is currently offline Emwedish EndargachewFriend
Messages: 27
Registered: April 2011
Junior Member
Hi Hugo,

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
Re: ATL Plugin Feature 'literal' not found error [message #905059 is a reply to message #905049] Wed, 29 August 2012 15:57 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
Hello,

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 Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: ATL Plugin Feature 'literal' not found error [message #905409 is a reply to message #905059] Thu, 30 August 2012 10:39 Go to previous messageGo to next message
Emwedish Endargachew is currently offline Emwedish EndargachewFriend
Messages: 27
Registered: April 2011
Junior Member
Hello Hugo,

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
Re: ATL Plugin Feature 'literal' not found error [message #905544 is a reply to message #905409] Thu, 30 August 2012 15:45 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
Hello,

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 Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: ATL Plugin Feature 'literal' not found error [message #905564 is a reply to message #905544] Thu, 30 August 2012 16:35 Go to previous messageGo to next message
Emwedish Endargachew is currently offline Emwedish EndargachewFriend
Messages: 27
Registered: April 2011
Junior Member
hi Hugo,

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
Re: ATL Plugin Feature 'literal' not found error [message #905881 is a reply to message #905564] Fri, 31 August 2012 08:52 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
Hi Emwedish,

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.

The latest version of the ATL API to run transformations programmatically (as used by ATL-specific launch configurations & ANT tasks) is described from http://wiki.eclipse.org/ATL/Developer_Guide#Core
You will also find some examples of use of it from this page, or directly from https://github.com/101companies/101repo/blob/master/contributions/atl/src/atl/RunTransfoJava.java.

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 Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: ATL Plugin Feature 'literal' not found error [message #905987 is a reply to message #905881] Fri, 31 August 2012 12:23 Go to previous messageGo to next message
Emwedish Endargachew is currently offline Emwedish EndargachewFriend
Messages: 27
Registered: April 2011
Junior Member
Hi Hugo,

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
Re: ATL Plugin Feature 'literal' not found error [message #906005 is a reply to message #905987] Fri, 31 August 2012 12:56 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
To handle XML documents as XML models, you need the org.eclipse.m2m.atl.projectors.xml plugin as described from 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 Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: ATL Plugin Feature 'literal' not found error [message #906024 is a reply to message #906005] Fri, 31 August 2012 13:29 Go to previous messageGo to next message
Emwedish Endargachew is currently offline Emwedish EndargachewFriend
Messages: 27
Registered: April 2011
Junior Member
Thanks hugo,

reading the Howtos now.

Will update you.

kind regards,
Emwedish
Re: ATL Plugin Feature 'literal' not found error [message #906040 is a reply to message #906024] Fri, 31 August 2012 13:57 Go to previous messageGo to next message
Emwedish Endargachew is currently offline Emwedish EndargachewFriend
Messages: 27
Registered: April 2011
Junior Member
Hi hugo,

I have an error while running the example you wrote:

import org.eclipse.core.runtime.NullProgressMonitor;

which library have you imported.

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
Re: ATL Plugin Feature 'literal' not found error [message #906051 is a reply to message #906040] Fri, 31 August 2012 14:22 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
Yes, it works with org.eclipse.core.runtime v3.8.x (I've just re-tested it right now).
Your error should come from something else (cf. the first error from your stack trace).

Best regards,

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: ATL Plugin Feature 'literal' not found error [message #908517 is a reply to message #906051] Wed, 05 September 2012 14:06 Go to previous messageGo to next message
Emwedish Endargachew is currently offline Emwedish EndargachewFriend
Messages: 27
Registered: April 2011
Junior Member
Hello Hugo,

Thanks a lot. Everything works fine now.

Cheers!

Re: ATL Plugin Feature 'literal' not found error [message #913459 is a reply to message #895516] Sat, 15 September 2012 18:10 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi,

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?

Re: ATL Plugin Feature 'literal' not found error [message #915509 is a reply to message #913459] Mon, 17 September 2012 12:40 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
Hello,

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 Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: ATL Plugin Feature 'literal' not found error [message #915528 is a reply to message #915509] Mon, 17 September 2012 13:16 Go to previous message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Thank you Hugo! I'll check it!
Previous Topic:creating two different target elements from one source element based on its subtypes
Next Topic:class is not found or is abstract
Goto Forum:
  


Current Time: Thu Dec 18 21:51:28 GMT 2014

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

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