Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » (Acceleo) Acceleo Evaluation Exception
(Acceleo) Acceleo Evaluation Exception [message #638120] Wed, 10 November 2010 01:32 Go to next message
Rich Weiskopf is currently offline Rich WeiskopfFriend
Messages: 1
Registered: November 2010
Junior Member
Eclipse Helios (3.6)
Acceleo 3.0.1.v201009150438

Am setting variables from a property file.
Everything worked fine until I tried the following syntax.

Any guidance is appreciated.

[comment encoding = UTF-8 /]
[module activator('http://www.eclipse.org/emf/2002/Ecore')/]

[template public activator()
{
packageBase : String = getProperty('propfile.properties','org.anorg.eclipse.plugin. packageBase');
projectName : String = getProperty('propfile.properties','org.anorg.eclipse.plugin. name');
}]
[file ([packageBase/].Activator.java, false, 'UTF-8')]
package [packageBase/];
[/file]

[/template]

--------------------------------
1. In the module editor, no errors are indicated.
2. When i execute acceleo (as java application), receive abnormal termination 'Acceleo Evaluation Exception' and a stack trace:


org.eclipse.acceleo.engine.AcceleoEvaluationException: Unresolved compilation error in generation module.
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 459)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:265)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 487)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 467)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:832)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 494)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 467)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:832)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 494)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 467)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(Query Impl.java:152)
at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:62)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvalua te(AcceleoEngine.java:267)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate (AcceleoEngine.java:131)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate Template(AcceleoService.java:544)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate (AcceleoService.java:380)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. generate(AbstractAcceleoGenerator.java:120)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. doGenerate(AbstractAcceleoGenerator.java:99)
at org.eclipse.acceleo.module.sample.files.Generate_worked.doGe nerate(Generate_worked.java:148)
at org.eclipse.acceleo.module.sample.files.Generate_worked.main (Generate_worked.java:126)
Exception in thread "main" java.lang.NullPointerException
at org.eclipse.acceleo.model.mtl.impl.spec.FileBlockSpec.toStri ng(FileBlockSpec.java:57)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionContext.createAcceleoException(AcceleoEvaluationContext. java:241)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionContext.createAcceleoException(AcceleoEvaluationContext. java:214)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:269)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 487)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 467)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:832)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 494)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 467)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:832)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 494)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 467)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(Query Impl.java:152)
at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:62)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvalua te(AcceleoEngine.java:267)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate (AcceleoEngine.java:131)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate Template(AcceleoService.java:544)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate (AcceleoService.java:380)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. generate(AbstractAcceleoGenerator.java:120)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. doGenerate(AbstractAcceleoGenerator.java:99)
at org.eclipse.acceleo.module.sample.files.Generate_worked.doGe nerate(Generate_worked.java:148)
at org.eclipse.acceleo.module.sample.files.Generate_worked.main (Generate_worked.java:126)
--------------------
Then an error appears, in the module editor, under the opening parenthesis in the opening [file statement and another error on the closing file statement [/file] saying 'The invocation isn't terminated'.
Re: (Acceleo) Acceleo Evaluation Exception [message #638155 is a reply to message #638120] Wed, 10 November 2010 08:56 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi Rich,

"Unresolved compilation error" means just that : you have compilation errors in the module. And indeed, the compiler would throw syntax exceptions in numerous places of this module. I believe you don't have the automatic build activated (Project > Automatic build) in your Eclipse, or you would have seen all of these.

Please read the documentation available in Eclipse Help > Help Contents or online for basic information on the syntax.

[template public activator()]
{
[let packageBase : String = getProperty('propfile.properties','org.anorg.eclipse.plugin. packageBase') ]
[let projectName : String = getProperty('propfile.properties','org.anorg.eclipse.plugin. name')]
[file (packageBase + '.Activator.java', false, 'UTF-8')]
package [packageBase/];
[/file]
[/let]
[/let]

[/template]

Laurent Goubet
Obeo
Previous Topic:[acceleo] How can I generate code automatically as a dependency on the target project?
Next Topic:How to invoke Xpand template into a Java-code????
Goto Forum:
  


Current Time: Wed Dec 11 13:57:58 GMT 2024

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

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

Back to the top