Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » NoClassDefFound on programmatic launch of the families2persons example
NoClassDefFound on programmatic launch of the families2persons example [message #897763] Wed, 25 July 2012 08:37 Go to next message
Stefan L is currently offline Stefan L
Messages: 13
Registered: July 2012
Junior Member
Hi,

I'm getting a NoClassDefFoundError when running the famlies2persons example from http://www.eclipse.org/forums/index.php/m/632793/. I just use exactly the same source code and got my paths right. There is no problem when I run the transformation via the atl run configuration manually!

As im rather new to atl i would be pleased if someone could help me on this issue. The error at occurs at amh.createModelLoader();:

//AtlModelHandler and ModelLoader init
    		AtlModelHandler.registerDefaultHandler("EMF", new AtlEMFModelHandler());   		
	    	AtlModelHandler amh = AtlModelHandler.getDefault("EMF");
	    	ModelLoader ml = amh.createModelLoader();


I'm using the atl 3.3 jars as user library in my java application project.

Error message in detail:

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/runtime/Platform
	at org.eclipse.m2m.atl.drivers.emf4atl.EMFModelLoader.<clinit>(EMFModelLoader.java:61)
	at org.eclipse.m2m.atl.drivers.emf4atl.AtlEMFModelHandler.createModelLoader(AtlEMFModelHandler.java:43)
	at Families2Persons.main(Families2Persons.java:21)



Regards
Stefan

[Updated on: Wed, 25 July 2012 09:43]

Report message to a moderator

Re: NoClassDefFound on programmatic launch of the families2persons example [message #898437 is a reply to message #897763] Thu, 26 July 2012 11:41 Go to previous messageGo to next message
Ronan B is currently offline Ronan B
Messages: 244
Registered: July 2009
Senior Member
Hi Stefan,
It sounds like your environment is not set up properly. See http://wiki.eclipse.org/ATL_Howtos#How_do_I_launch_transformations_programmatically.3F

From the error it is pretty clear the ATL jars don't have a hamdle to the eclipse runtime.
Regards,
Ronan
Re: NoClassDefFound on programmatic launch of the families2persons example [message #898520 is a reply to message #898437] Thu, 26 July 2012 14:08 Go to previous messageGo to next message
Stefan L is currently offline Stefan L
Messages: 13
Registered: July 2012
Junior Member
Thanks alot Ronan Smile

I just had to include the emf and eclipse jars into my user library and it is working fine now!

Stefan
Re: NoClassDefFound on programmatic launch of the families2persons example [message #899523 is a reply to message #898520] Wed, 01 August 2012 09:38 Go to previous messageGo to next message
Emwedish Endargachew is currently offline Emwedish Endargachew
Messages: 27
Registered: April 2011
Junior Member
Hi Stefan,

It is not still working for me, can you tell me what version of the EMF and Eclipse jars you added?


thanks in advance,
Emwedish
Re: NoClassDefFound on programmatic launch of the families2persons example [message #900130 is a reply to message #899523] Sat, 04 August 2012 11:40 Go to previous message
Stefan L is currently offline Stefan L
Messages: 13
Registered: July 2012
Junior Member
Hi Emwedish,

I'm using the latest Juno Eclipse, JDK 1.7 as Compiler. Besides ATL Version 3.3, I copied and added the following Jars from the eclipse plugin folder to my user library in my project folder:

http:// i.imgur.com/wAeH0.jpg (please remove the whitespace after // in the link.

Hope it helps.

Greetings
Stefan

[Updated on: Sat, 04 August 2012 11:41]

Report message to a moderator

Previous Topic:Re: [ATL][AML]Information on AML
Next Topic:Execute atl in a java program
Goto Forum:
  


Current Time: Thu Sep 18 01:49:23 GMT 2014

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

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