Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Simple, step by step, working tutorial, from UML to code?
|Re: [Acceleo] Simple, step by step, working tutorial, from UML to code? [message #1021658 is a reply to message #1021322]
||Wed, 20 March 2013 09:16
| Stephane Begaudeau
Registered: April 2010
Location: Nantes (France)
"Couldn't load class org.eclipse.acceleo.module.sample.main.Generate
from project org.eclipse.acceleo.module.sample"
and a warning:
"Couldn't load class org.eclipse.acceleo.module.sample.main.Generate.
Check that its containing package is exported."
If you open the file MANIFEST.MF of your generator, do you have the package containing your java launcher exported as detailled here?
Since this module contains a @main annotation, we will need to export its containing package (so that other Eclipse plugins may launch the generation). For this, open the META-INF/MANIFEST.MF file of your project, go to its Runtime tab, click Add and select the org.eclipse.acceleo.module.sample.main package. The tab should look like this when you are done :
Stephane Begaudeau, Obeo
Blog: http://stephanebegaudeau.tumblr.com | Eclipse Java Development Tools Tips and Tricks
|Re: [Acceleo] Simple, step by step, working tutorial, from UML to code? [message #1021812 is a reply to message #1021658]
||Wed, 20 March 2013 14:14
| Joost Kraaijeveld
Registered: July 2009
On 20-03-13 14:16, Stephane Begaudeau wrote:|
> "Couldn't load class org.eclipse.acceleo.module.sample.main.Generate
> from project org.eclipse.acceleo.module.sample"
> and a warning:
> "Couldn't load class org.eclipse.acceleo.module.sample.main.Generate.
> Check that its containing package is exported."
> If you open the file MANIFEST.MF of your generator, do you have the
> package containing your java launcher exported as detailled
Of course not. The tutorial does not mention this at the point (or
before the point) where it says "Right-click on the Acceleo module file
(that is, the generate.mtl file) and select Run As > Launch Acceleo
Application.". It mentions this 8 times pages down on a 21' screen, 9600
pixels below the first time it says to generate. Strange that I did not
notice this before. Silly me.
But thanks for the tip. It seems to work now.
Current Time: Wed Jul 23 16:19:28 EDT 2014
Powered by FUDForum
. Page generated in 0.02878 seconds