Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Debugging an acceleo module
[Acceleo] Debugging an acceleo module [message #539625] Fri, 11 June 2010 14:31 Go to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
Hi all, I am trying to debug an acceleo module but it seems I cant. I have read the documentation and I have done the following:

Debug as Acceleo Application. And then I put the model and the folder in the run configurations, I also mark "Contribute traceability information to result view"

My main module is main.mtl and I put a breakpoint on its first instruction. Then I run it, but it doesnt even get to the first instruction. I mean i go to debug view and I see: <Terminated>Main(1) [Acceleo Application]

But I get no error messages anywhere so I dont know how to fix it.

Where can I find those messages?

Why you think it instantly terminates?

Thank you very much.
Re: [Acceleo] Debugging an acceleo module [message #539815 is a reply to message #539625] Sun, 13 June 2010 16:36 Go to previous messageGo to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
Ok I have seen the error messages, here they are:

eclipse.buildId=I20100520-1744
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86


Warning
Fri Jun 11 16:25:46 CEST 2010
Can't find bundle for base name org.acceleo.module.pim.uml21.gen.java.default, locale es_ES

java.util.MissingResourceException: Can't find bundle for base name org.acceleo.module.pim.uml21.gen.java.default, locale es_ES
at java.util.ResourceBundle.throwMissingResourceException(Unkno wn Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at org.eclipse.acceleo.common.internal.utils.workspace.AcceleoW orkspaceUtil.getResourceBundle(AcceleoWorkspaceUtil.java:551 )
at org.eclipse.acceleo.engine.internal.environment.AcceleoPrope rtiesLookup.addProperties(AcceleoPropertiesLookup.java:66)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.addPrope rties(AcceleoEngine.java:89)
at org.eclipse.acceleo.engine.service.AcceleoService.addPropert iesFile(AcceleoService.java:177)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. createAcceleoService(AbstractAcceleoGenerator.java:392)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. generate(AbstractAcceleoGenerator.java:116)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. doGenerate(AbstractAcceleoGenerator.java:99)
at org.acceleo.module.pim.uml21.gen.java.migrated.files.Main.do Generate(Main.java:154)
at org.acceleo.module.pim.uml21.gen.java.migrated.files.Main.ma in(Main.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchO peration.run(AcceleoLaunchOperation.java:105)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 220)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 123)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchD elegate.launch(AcceleoLaunchDelegate.java:53)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

And:

eclipse.buildId=I20100520-1744
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86


Warning
Sun Jun 13 18:24:50 CEST 2010
Can't find bundle for base name org.acceleo.module.pim.uml21.gen.java.types, locale es_ES

java.util.MissingResourceException: Can't find bundle for base name org.acceleo.module.pim.uml21.gen.java.types, locale es_ES
at java.util.ResourceBundle.throwMissingResourceException(Unkno wn Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at org.eclipse.acceleo.common.internal.utils.workspace.AcceleoW orkspaceUtil.getResourceBundle(AcceleoWorkspaceUtil.java:551 )
at org.eclipse.acceleo.engine.internal.environment.AcceleoPrope rtiesLookup.addProperties(AcceleoPropertiesLookup.java:66)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.addPrope rties(AcceleoEngine.java:89)
at org.eclipse.acceleo.engine.service.AcceleoService.addPropert iesFile(AcceleoService.java:177)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. createAcceleoService(AbstractAcceleoGenerator.java:392)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. generate(AbstractAcceleoGenerator.java:116)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. doGenerate(AbstractAcceleoGenerator.java:99)
at org.acceleo.module.pim.uml21.gen.java.migrated.files.Main.do Generate(Main.java:154)
at org.acceleo.module.pim.uml21.gen.java.migrated.files.Main.ma in(Main.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchO peration.run(AcceleoLaunchOperation.java:105)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 220)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 123)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchD elegate.launch(AcceleoLaunchDelegate.java:53)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

And I do have an idea where it comes.

In my project, in the src source folder I have this package:

org.acceleo.module.pim.uml21.gen.java

And inside there are the files: default.properties and types.properties.

So to use them I went to the Main.java file and I added some lines that seem to be not working to the getProperties() method:

/**
* If the module(s) called by this launcher require properties files, return their qualified path from
* here.Take note that the first added properties files will take precedence over subsequent ones if they
* contain conflicting keys.
* <p>
* Properties need to be in source folders, the path that we expect to get as a result of this call are of
* the form &lt;package>.&lt;properties file name without extension>. For example, if you have a file
* named "messages.properties" in package "org.eclipse.acceleo.sample", the path that needs be returned by
* a call to {@link #getProperties()} is "org.eclipse.acceleo.sample.messages".
* </p>
*
* @return The list of properties file we need to add to the generation context.
* @see java.util.ResourceBundle#getBundle(String)
* @not-generated
*/
@Override
public List<String> getProperties() {
List<String> propertiesFiles = super.getProperties();
// Nasgun
/*
* TODO if your generation module requires access to properties files,
* add their qualified path to the list here. Properties files are
* expected to be in source folders, and the path here to be the
* qualified path as if referring to a Java class. For example, if you
* have a file named "messages.properties" in package
* "org.eclipse.acceleo.sample", the path that needs be added to this
* list is "org.eclipse.acceleo.sample.messages".
*/
propertiesFiles.add("org.acceleo.module.pim.uml21.gen.java.default ");
propertiesFiles.add("org.acceleo.module.pim.uml21.gen.java.types ");
return propertiesFiles;
}

I added this:

propertiesFiles.add("org.acceleo.module.pim.uml21.gen.java.default ");
propertiesFiles.add("org.acceleo.module.pim.uml21.gen.java.types ");

But it seems its not the way to do it, so what am I doing wrong?

Thank you!


Re: [Acceleo] Debugging an acceleo module [message #540233 is a reply to message #539815] Tue, 15 June 2010 13:01 Go to previous messageGo to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
Solved, files must be on the same folder as the module so that the java class has access to them.

But still it doesnt generate anything, why is that?

And now no error messages Sad
Re: [Acceleo] Debugging an acceleo module [message #540239 is a reply to message #540233] Tue, 15 June 2010 13:08 Go to previous messageGo to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
The only thing I get is a warning:

Description Resource Path Location Type
Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. org.acceleo.module.pim.uml21.gen.java.migrated Build path JRE System Library Problem


But I do have installed jre1.6, so what it might be?
Re: [Acceleo] Debugging an acceleo module [message #540622 is a reply to message #539625] Wed, 16 June 2010 17:52 Go to previous messageGo to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
I've been reading and that warning seems to be only that, a warning:

http://www.eclipsezone.com/eclipse/forums/t113874.html

So, why still, I launch the module and get nothing? And it doesnt even get to the first breakpoint and it doesnt even give me an error message.

I dont know what to do next Sad
Re: [Acceleo] Debugging an acceleo module [message #540624 is a reply to message #540622] Wed, 16 June 2010 17:55 Go to previous messageGo to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
This is the full main module if it helps:

[comment encoding = UTF-8 /]
[module main('http://www.eclipse.org/uml2/2.1.0/UML')/]

[import org::acceleo::module::pim::uml21::gen::java::class /]
[import org::acceleo::module::pim::uml21::gen::java::enum /]
[import org::acceleo::module::pim::uml21::gen::java::interface /]
[import org::acceleo::module::pim::uml21::gen::java::validator::core /]

[template public main(m : Model)]
[comment @main /]

[comment Call the file block in 'class' /]
[m.packagedElement->filter(Class).classJava() /]

[comment Call the file block in 'enum' /]
[ m.packagedElement->filter(Enumeration).enumJava() /]

[comment Call the file block in 'interface' /]
[ m.packagedElement->filter(Interface).interfaceJava() /]

[comment Call the file block in 'core' /]
[ validator() /]

[/template]

I put a breakpoint on:

[m.packagedElement->filter(Class).classJava() /]

And it doesnt even get there :S
Re: [Acceleo] Debugging an acceleo module [message #540807 is a reply to message #540622] Thu, 17 June 2010 12:08 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1638
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080209020108050609080204
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Daniel,

Sorry, Haven't had enough time with the Helios release to read (and
respond) to all newsgroup messages of late.

I don't know which of the problems you talk about in this thread are
still bugging you, but in no particular order :

- You don't need to tick "contribute traceability information" to debug
a generation. Debug and traceability are two separate things
- "java.util.MissingResourceException: Can't find bundle for base name
org.acceleo.module.pim.uml21.gen.java.default" means that the file
"default.properties" cannot be found in the classpath of the java
launcher, seems you managed to get through that one.
- "There are no JREs installed in the workspace that are strictly
compatible with this environment." is indeed "just" a warning ... if you
tell Eclipse to compile for java 5 (which you do : "Build path specifies
execution environment J2SE-1.5") yet you only have the jdk 6 installed,
you risk errors when using java 6 methods as the compiler won't know
that this method didn't exist in java 5 (try it with String.isEmpty()).
- That it doesn't reach your first breakpoint could mean that Acceleo
doesn't find even one element of the required type on the model you pass
as argument of the generation (your "main" template is defined on
"Stereotype" yet your UML model doesn't sport even one stereotype)

Also note that Acceleo debugging only works when launching the
generation as Acceleo plug-in application.

If this wasn't the issue, you might have to debug the Java launcher to
see where it fails, if you do everything in a single eclipse (without
launching a runtime) this might prove a little more difficult than
simply launching this runtime as "debug". In that case you will need to
launch a new "Eclipse application" in debug mode (open the run
configurations to create a new eclipse application), import in this new
eclipse you generation projects, create anew the acceleo launch config,
and launch it from there. Place your breakpoints in the first of these
two Eclipses; a good starting break point would be in
AbstractAcceleoGenerator#doGenerate() to see what's happening in there
when you launch the generation.

Laurent Goubet
Obeo


Daniel wrote:
> I've been reading and that warning seems to be only that, a warning:
>
> http://www.eclipsezone.com/eclipse/forums/t113874.html
>
> So, why still, I launch the module and get nothing? And it doesnt even
> get to the first breakpoint and it doesnt even give me an error message.
>
> I dont know what to do next :(


--------------080209020108050609080204
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------080209020108050609080204--
Re: [Acceleo] Debugging an acceleo module [message #540920 is a reply to message #539625] Thu, 17 June 2010 15:51 Go to previous messageGo to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
Hi and thank you for your response.

1- So to solve the warning should I install jre1.5 or its better to change the execution environment to 1.6?

2- I didnt get why my main is defined on Stereotype, I mean I have:

[comment encoding = UTF-8 /]
[module main('http://www.eclipse.org/uml2/2.1.0/UML')/]

[import org::acceleo::module::pim::uml21::gen::java::class /]
[import org::acceleo::module::pim::uml21::gen::java::enum /]
[import org::acceleo::module::pim::uml21::gen::java::interface /]
[import org::acceleo::module::pim::uml21::gen::java::validator::core /]

[template public main(m : Model)]
[comment @main /]

I thought it would search for a "m:Model".

Could it be that like I have written it it doesnt get to the classes and packed elements? I mean, my model has a Package named ss and inside a class named Class1, thats all.

Could it be that it doesnt find the class because it is inside a package?

Defining my main.mtl like this:

[template public main(m : Model)]
[comment @main /]

[comment Call the file block in 'class' /]
[m.packagedElement->filter(Class).classJava() /]

[comment Call the file block in 'enum' /]
[ m.packagedElement->filter(Enumeration).enumJava() /]

[comment Call the file block in 'interface' /]
[ m.packagedElement->filter(Interface).interfaceJava() /]

[comment Call the file block in 'core' /]
[ validator() /]

[/template]

I did this change:

[template public main(m : Package)]
[comment @main /]

[comment Call the file block in 'class' /]
[m.packagedElement->filter(Class).classJava() /]

[comment Call the file block in 'enum' /]
[m.packagedElement->filter(Enumeration).enumJava() /]

[comment Call the file block in 'interface' /]
[m.packagedElement->filter(Interface).interfaceJava() /]

[/template]

I mean changing it to a Package and now I think it works, I mean, it doesnt generate anything but I get errors:

eclipse.buildId=I20100520-1744
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86


Error
Thu Jun 17 18:20:11 CEST 2010
Evaluation failed with an exception: Index: 1, Size: 1

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.prepareInvocation(AcceleoEvaluationVisitor.java: 1345)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:804)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:430)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 481)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.model.mtl.impl.spec.TemplateInvocationSp ec.accept(TemplateInvocationSpec.java:49)
at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp( EvaluationVisitorImpl.java:162)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitOperationCal lExp(EvaluationVisitorDecorator.java:269)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitOperationCallExp(AcceleoTraceabilityVis itor.java:641)
at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(Opera tionCallExpImpl.java:390)
at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp( EvaluationVisitorImpl.java:162)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitOperationCal lExp(EvaluationVisitorDecorator.java:269)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitOperationCallExp(AcceleoTraceabilityVis itor.java:641)
at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(Opera tionCallExpImpl.java:390)
at org.eclipse.ocl.AbstractEvaluationVisitor.visitExpression(Ab stractEvaluationVisitor.java:247)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitExpression(E valuationVisitorDecorator.java:156)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 506)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:458)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoIfBlock(AcceleoEvaluationVi sitorDecorator.java:163)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoIfBlock(AcceleoTraceabilityVisit or.java:372)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 460)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:469)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoIfBlock(AcceleoEvaluationVi sitorDecorator.java:163)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoIfBlock(AcceleoTraceabilityVisit or.java:372)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 460)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 454)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:430)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 481)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:469)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoIfBlock(AcceleoEvaluationVi sitorDecorator.java:163)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoIfBlock(AcceleoTraceabilityVisit or.java:372)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 460)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 454)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:430)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 481)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:265)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoFileBlock(AcceleoEvaluation VisitorDecorator.java:143)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoFileBlock(AcceleoTraceabilityVis itor.java:333)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 474)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 454)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:430)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 481)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.ocl.internal.evaluation.IterationTemplate.evalua te(IterationTemplate.java:87)
at org.eclipse.ocl.EvaluationVisitorImpl.evaluateCollectIterato r(EvaluationVisitorImpl.java:1593)
at org.eclipse.ocl.EvaluationVisitorImpl.visitIteratorExp(Evalu ationVisitorImpl.java:1443)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitIteratorExp( EvaluationVisitorDecorator.java:241)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitIteratorExp( EvaluationVisitorDecorator.java:241)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitIteratorExp(AcceleoTraceabilityVisitor. java:594)
at org.eclipse.ocl.ecore.impl.IteratorExpImpl.accept(IteratorEx pImpl.java:114)
at org.eclipse.ocl.AbstractEvaluationVisitor.visitExpression(Ab stractEvaluationVisitor.java:247)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitExpression(E valuationVisitorDecorator.java:156)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 506)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 454)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
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:266)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate (AcceleoEngine.java:130)
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.acceleo.module.pim.uml21.gen.java.migrated.files.Main.do Generate(Main.java:154)
at org.acceleo.module.pim.uml21.gen.java.migrated.files.Main.ma in(Main.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchO peration.run(AcceleoLaunchOperation.java:105)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 199)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 117)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchD elegate.launch(AcceleoLaunchDelegate.java:53)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

And:

eclipse.buildId=I20100520-1744
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86


Error
Thu Jun 17 18:20:11 CEST 2010
Evaluation failed with an exception: (no message)

java.util.NoSuchElementException
at java.util.LinkedList.getLast(Unknown Source)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionContext.append(AcceleoEvaluationContext.java:167)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.append(AcceleoEvaluationVisitor.java:217)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.append(AcceleoEvaluationVisitorDecorato r.java:87)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.append(AcceleoTraceabilityVisitor.java:236)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.delegateAppend(AcceleoEvaluationVisitor.java:108 9)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:92 9)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 454)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:430)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 481)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:469)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoIfBlock(AcceleoEvaluationVi sitorDecorator.java:163)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoIfBlock(AcceleoTraceabilityVisit or.java:372)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 460)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 454)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:430)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 481)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:265)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoFileBlock(AcceleoEvaluation VisitorDecorator.java:143)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoFileBlock(AcceleoTraceabilityVis itor.java:333)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 474)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 454)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:430)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 481)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.ocl.internal.evaluation.IterationTemplate.evalua te(IterationTemplate.java:87)
at org.eclipse.ocl.EvaluationVisitorImpl.evaluateCollectIterato r(EvaluationVisitorImpl.java:1593)
at org.eclipse.ocl.EvaluationVisitorImpl.visitIteratorExp(Evalu ationVisitorImpl.java:1443)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitIteratorExp( EvaluationVisitorDecorator.java:241)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitIteratorExp( EvaluationVisitorDecorator.java:241)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitIteratorExp(AcceleoTraceabilityVisitor. java:594)
at org.eclipse.ocl.ecore.impl.IteratorExpImpl.accept(IteratorEx pImpl.java:114)
at org.eclipse.ocl.AbstractEvaluationVisitor.visitExpression(Ab stractEvaluationVisitor.java:247)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitExpression(E valuationVisitorDecorator.java:156)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 506)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 454)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
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:266)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate (AcceleoEngine.java:130)
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.acceleo.module.pim.uml21.gen.java.migrated.files.Main.do Generate(Main.java:154)
at org.acceleo.module.pim.uml21.gen.java.migrated.files.Main.ma in(Main.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchO peration.run(AcceleoLaunchOperation.java:105)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 199)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 117)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchD elegate.launch(AcceleoLaunchDelegate.java:53)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

And

eclipse.buildId=I20100520-1744
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86


Error
Thu Jun 17 18:20:11 CEST 2010


java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchO peration.run(AcceleoLaunchOperation.java:105)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 199)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 117)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchD elegate.launch(AcceleoLaunchDelegate.java:53)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.util.NoSuchElementException
at java.util.LinkedList.getLast(Unknown Source)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionContext.append(AcceleoEvaluationContext.java:167)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.append(AcceleoEvaluationVisitor.java:217)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.append(AcceleoEvaluationVisitorDecorato r.java:87)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.append(AcceleoTraceabilityVisitor.java:236)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.delegateAppend(AcceleoEvaluationVisitor.java:108 9)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:92 9)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 454)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:518)
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:266)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate (AcceleoEngine.java:130)
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.acceleo.module.pim.uml21.gen.java.migrated.files.Main.do Generate(Main.java:154)
at org.acceleo.module.pim.uml21.gen.java.migrated.files.Main.ma in(Main.java:132)
... 13 more

And last:

eclipse.buildId=I20100520-1744
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86


Warning
Thu Jun 17 18:20:11 CEST 2010
Undefined condition of "If" at line 21 in Module common for block if (packagePath('/').size().<>(0)). Last recorded value of self was org.eclipse.uml2.uml.internal.impl.ClassImpl@efae19 (name: Class1, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false).

org.eclipse.acceleo.engine.AcceleoEvaluationException: Undefined condition of "If" at line 21 in Module common for block if (packagePath('/').size().<>(0)). Last recorded value of self was org.eclipse.uml2.uml.internal.impl.ClassImpl@efae19 (name: Class1, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false).

eclipse.buildId=I20100520-1744
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86


Warning
Thu Jun 17 18:20:11 CEST 2010
Undefined condition of "If" at line 21 in Module common for block if (packagePath('/').size().<>(0)). Last recorded value of self was org.eclipse.uml2.uml.internal.impl.ClassImpl@efae19 (name: Class1, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false).

org.eclipse.acceleo.engine.AcceleoEvaluationException: Undefined condition of "If" at line 21 in Module common for block if (packagePath('/').size().<>(0)). Last recorded value of self was org.eclipse.uml2.uml.internal.impl.ClassImpl@efae19 (name: Class1, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false).

And those (although I dont know how to track them) seem to me like execution problems and exceptions derived from bad coding of the module.

Now it reachs to the breakpoint and I have been able to execute step by step.

So I dont know how to do it but I want a generator that seeks for all the packages in the model, and inside each package it looks for classes, interfaces and enumerations and generates its code in its package folder.

I dont mind if I have to call it on m : Model or p : Package, but I think the last option could bring problems with nested packages, so how could I do it?

3- If it isnt because of point 2 I will get into the Main.java like you said.

Thank you very much!

[Updated on: Thu, 17 June 2010 16:29]

Report message to a moderator

Re: [Acceleo] Debugging an acceleo module [message #541066 is a reply to message #540920] Fri, 18 June 2010 08:19 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1638
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050706020506050404040903
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Daniel,

Comments inlined below.

Laurent Goubet
Obeo

Daniel wrote:
> Hi and thank you for your response.
>
> 1- So to solve the warning should I install jre1.5 or its better to
> change the execution environment to 1.6?

That is your call. If your program must run with 1.5, the best is to
install it. Otherwise simply change for 1.6.

>
> 2- I didnt get why my main is defined on Stereotype, I mean I have:

That was an example :p i said "Stereotype" as I could have "Model" or
"Class".

>
> [comment encoding = UTF-8 /]
> [module main('http://www.eclipse.org/uml2/2.1.0/UML')/]
>
> [import org::acceleo::module::pim::uml21::gen::java::class /]
> [import org::acceleo::module::pim::uml21::gen::java::enum /]
> [import org::acceleo::module::pim::uml21::gen::java::interface /]
> [import org::acceleo::module::pim::uml21::gen::java::validator::core /]
>
> [template public main(m : Model)]
> [comment @main /]
>
> I thought it would search for a "m:Model". May it be defined by the:

Yup, that means we'll search for an element of type "Model" in the model
you select for the launch configuration.

>
> [module main('http://www.eclipse.org/uml2/2.1.0/UML')/] ?
>
> I thought that was the metamodel but maybe I got it all wrong.

It is.

>
> I want the main model to take a UML model, and search for the classes,
> enumerations and interfaces, even if the model has no Stereotypes, so
> what should I change?
>
> 3- If it isnt because of the Stereotype I will get into the Main.java as
> you said.

That would be best yes, you'll need to debug a little.

>
> Thank you very much!
>
>


--------------050706020506050404040903
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------050706020506050404040903--
Re: [Acceleo] Debugging an acceleo module [message #541351 is a reply to message #541066] Sun, 20 June 2010 11:50 Go to previous messageGo to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
Hi and thank you for your response!

I'm going to start debugging it using this template:

[template public main(m : Package)]
[comment @main /]

[comment Call the file block in 'class' /]
[m.packagedElement->filter(Class).classJava() /]

[comment Call the file block in 'enum' /]
[m.packagedElement->filter(Enumeration).enumJava() /]

[comment Call the file block in 'interface' /]
[m.packagedElement->filter(Interface).interfaceJava() /]

[/template]


Calling it on a Package, I mean.

But I dont know the following:

1 - Calling the main template on Package instead of Model could cause any problem in any type of Model?

2 - I am not sure if this is recursive I mean if I have a model like:

Package1
Class1
Package2
Class2

Would it generate a folder named Package1 with Class1.java inside and also inside that folder another folder called Package2 with Class2.java inside?

If it doesnt do it, how could I do it? I think I could think about it in Acceleo2 but I still dont control the OCL syntax that well so could you help me please?

Thank you!
Re: [Acceleo] Debugging an acceleo module [message #541460 is a reply to message #541351] Mon, 21 June 2010 09:21 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1638
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080002040309000607070209
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Daniel,

Comments inlined below.

Laurent Goubet
Obeo

Daniel wrote:
> Hi and thank you for your response!
>
> I'm going to start debugging it using this template:
>
> [template public main(m : Package)]
> [comment @main /]
>
> [comment Call the file block in 'class' /]
> [m.packagedElement->filter(Class).classJava() /]
>
> [comment Call the file block in 'enum' /]
> [m.packagedElement->filter(Enumeration).enumJava() /]
>
> [comment Call the file block in 'interface' /]
> [m.packagedElement->filter(Interface).interfaceJava() /]
>
> [/template]
>
>
> Calling it on a Package, I mean.
>
> But I dont know the following:
>
> 1 - Calling the main template on Package instead of Model could cause
> any problem in any type of Model?

I Don't understand your question ... UML models often (if not always)
contain Packages to properly give namespaces to classes, interfaces, ...
I'd say calling your main tempalte on packages won't cause any issue.

>
> 2 - I am not sure if this is recursive I mean if I have a model like:
>
> Package1
> Class1
> Package2
> Class2

It is recursive. We'll call the template on each element of type
"Package" we can find in the input model.

>
> Would it generate a folder named Package1 with Class1.java inside and
> also inside that folder another folder called Package2 with Class2.java
> inside?

Depends on the templates which generate the class*.java files. If you
have [file] blocks in there which file path are
"<packageName>/<className>.java" then yes, it will create such a
directory structure.

>
> If it doesnt do it, how could I do it? I think I could think about it in
> Acceleo2 but I still dont control the OCL syntax that well so could you
> help me please?

if it doesn't do it, that means the paths of your file blocks aren't
well formed. For example your "classJava()" template should begin with
the following :

[template public classJava(c : Class)]
[file (c.package.name.toLower() + '/' + c.name.toUpperFirst() + '.java',
false)]

code to generate a java class here

[/file]
[/template]

>
> Thank you!


--------------080002040309000607070209
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------080002040309000607070209--
Re: [Acceleo] Debugging an acceleo module [message #541559 is a reply to message #541460] Mon, 21 June 2010 14:32 Go to previous message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
Thank you, I will let it like it is now and if I have problems I will try to change it!
Previous Topic:How to create an static function with an annotation in Model?
Next Topic:[Acceleo 3] properties files
Goto Forum:
  


Current Time: Mon Nov 24 16:31:25 GMT 2014

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

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