Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Unable to find module?
[Acceleo] Unable to find module? [message #791755] Mon, 06 February 2012 03:15 Go to next message
Eclipse UserFriend
Hi,

I'm trying to execute an Acceleo M2T transformation from java. Execution starts but it fails with trowing this exception:

org.eclipse.acceleo.engine.AcceleoEvaluationException: Could not find public template generate in module generate.
	at org.eclipse.acceleo.engine.service.AcceleoService.findTemplates(AcceleoService.java:1084)
	at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate(AcceleoService.java:550)
	at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.generate(AbstractAcceleoGenerator.java:193)
	at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.doGenerate(AbstractAcceleoGenerator.java:158)
	at asml.carm.pgwb.pgwb2c.files.Generate.doGenerate(Generate.java:192)
	at asml.carm.pgwb.pgwbm2c.GenerateImplementation.generateCode(GenerateImplementation.java:103)


What I tried: I have two projects, one being a simple Acceleo project containing the actual transformation and one Java project that will be invoking the transformation. The project setup is such that the Java project depends on the Acceleo project.

In order to test this, I just execute a run-time eclipse instance from eclipse. Then when I invoke the java project (via a right-click pop menu entry) I get the exception.

I suspect that I need to configure where to find the templates but how? How should I make these projects depend on each other?

Greetings,
Wilbert.

[Updated on: Mon, 06 February 2012 03:16] by Moderator

Re: [Acceleo] Unable to find module? [message #792677 is a reply to message #791755] Tue, 07 February 2012 04:14 Go to previous message
Eclipse UserFriend
Hi,

Do you have two templates named "generate"? Are you using Acceleo 3.0.x (you may want to switch to 3.1.2)? Does your Java launcher generated by Acceleo has just a file name for the name of the module (MODULE_NAME = "Yop" and not MODULE_NAME = "com/mydomain/mypackage/myotherpackage/Yop")?

If yes, then Acceleo will look for the first module named "generate" that can be found, it may not be your main module.

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau & @acceleo
Google+: stephane.begaudeau & acceleo
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo
Previous Topic:Using Acceleo investigating a model
Next Topic:Syntax clarification.
Goto Forum:
  


Current Time: Thu Jul 17 09:56:56 EDT 2025

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

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

Back to the top