Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Debugging problems with propertys
[Acceleo] Debugging problems with propertys [message #542314] Thu, 24 June 2010 14:08 Go to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
Hi again.

I have been debugging the migrated uml2java module and now it does generate files but an exception is raised and it doesnt let me call it using Java. These are the exceptions:

FIRST

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 24 16:01:06 CEST 2010
Undefined condition of "If" at line 37 in Module import for block if (self.getProperty('java.typeconversion.'.concat(self.name)). <>(null)). Last recorded value of self was .

org.eclipse.acceleo.engine.AcceleoEvaluationException: Undefined condition of "If" at line 37 in Module import for block if (self.getProperty('java.typeconversion.'.concat(self.name)). <>(null)). Last recorded value of self was .
at import.genImportPath(Type)(import.mtl:37)
at import.genImportPath(Type)(import.mtl:36)
at import.genImport(Classifier)(import.mtl:0)
at import.genImport(Classifier)(import.mtl:0)
at import.genImport(Classifier)(import.mtl:21)
at import.genImport(Classifier)(import.mtl:20)
at import.genImport(Classifier)(import.mtl:7)
at class.classJava(Class)(class.mtl:0)
at class.classJava(Class)(class.mtl:10)
at class.classJava(Class)(class.mtl:8)
at main.main(Package)(main.mtl:0)
at main.main(Package)(main.mtl:0)
at main.main(Package)(main.mtl:9)

SECOND

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 24 16:01:06 CEST 2010
Undefined condition of "If" at line 37 in Module import for block if (self.getProperty('java.typeconversion.'.concat(self.name)). <>(null)). Last recorded value of self was [Lorg.eclipse.uml2.uml.Classifier;@1d6d605.

org.eclipse.acceleo.engine.AcceleoEvaluationException: Undefined condition of "If" at line 37 in Module import for block if (self.getProperty('java.typeconversion.'.concat(self.name)). <>(null)). Last recorded value of self was [Lorg.eclipse.uml2.uml.Classifier;@1d6d605.
at import.genImportPath(Type)(import.mtl:37)
at import.genImportPath(Type)(import.mtl:36)
at import.genImport(Classifier)(import.mtl:0)
at import.genImport(Classifier)(import.mtl:26)
at import.genImport(Classifier)(import.mtl:25)
at import.genImport(Classifier)(import.mtl:7)
at class.classJava(Class)(class.mtl:0)
at class.classJava(Class)(class.mtl:10)
at class.classJava(Class)(class.mtl:8)
at main.main(Package)(main.mtl:0)
at main.main(Package)(main.mtl:0)
at main.main(Package)(main.mtl:9)

THIRD

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 24 16:01:06 CEST 2010
Evaluation failed with an exception: (no message)

java.lang.IllegalArgumentException
at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.navigatePro perty(EcoreEvaluationEnvironment.java:197)
at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.navigatePro perty(EcoreEvaluationEnvironment.java:1)
at org.eclipse.ocl.EvaluationVisitorImpl.visitPropertyCallExp(E valuationVisitorImpl.java:1925)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitPropertyCallExp(AcceleoEvaluationVisitor.ja va:999)
at org.eclipse.ocl.ecore.impl.PropertyCallExpImpl.accept(Proper tyCallExpImpl.java:238)
at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp( EvaluationVisitorImpl.java:561)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(Opera tionCallExpImpl.java:390)
at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp( EvaluationVisitorImpl.java:174)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
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.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.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:458)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 462)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
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.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.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.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:458)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 462)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.ja va:423)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 469)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:316)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 476)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
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.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.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 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: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: 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)

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


Error
Thu Jun 24 16:01:06 CEST 2010
Evaluation failed with an exception: (no message)

java.lang.IllegalArgumentException
at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.navigatePro perty(EcoreEvaluationEnvironment.java:197)
at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.navigatePro perty(EcoreEvaluationEnvironment.java:1)
at org.eclipse.ocl.EvaluationVisitorImpl.visitPropertyCallExp(E valuationVisitorImpl.java:1925)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitPropertyCallExp(AcceleoEvaluationVisitor.ja va:999)
at org.eclipse.ocl.ecore.impl.PropertyCallExpImpl.accept(Proper tyCallExpImpl.java:238)
at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp( EvaluationVisitorImpl.java:561)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(Opera tionCallExpImpl.java:390)
at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp( EvaluationVisitorImpl.java:174)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
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.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.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:458)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 462)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.ja va:423)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 469)
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 tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 462)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:316)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 476)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:822)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
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.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.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 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: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: 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)


They come from this code:

[template public genImport(classifier : Classifier) post(trim())]
[comment millones de cambios CONCRETAMENTE UNIONS/]
[if (not (isArray()))]
[if((ownedMember-> filter(Operation).ownedParameter.oclAsType(MultiplicityEleme nt)- >union(ownedMember->filter(Property).oclAsType(MultiplicityElement))- >union(getAssociations().navigableOwnedEnd))->select((upper = -1 or upper > 1) and isOrdered) <> null)]
[comment Collection class for ordered multiple elements /]import [getOrderedCollectionClassPath()/];
[/if]
[if((ownedMember-> filter(Operation).ownedParameter.oclAsType(MultiplicityEleme nt)- >union(ownedMember->filter(Property).oclAsType(MultiplicityElement))- >union(getAssociations().navigableOwnedEnd))->select((upper = -1 or upper > 1) and not isOrdered) <> null)]
[comment Collection class for not ordered multiple elements /]import [getNotOrderedCollectionClassPath()/];
[/if]
[comment If no multiple elements, do nothing! /][/if]

[comment Import referenced model elements /]
[comment millones de cambios, concretamente los OCL AS TYPE/]
[for (getTypeList()->asOrderedSet()->asSequence())]
[if (self.oclAsType(Type).genImportPath().index('.') <> -1)]
import [self.oclAsType(Type).genImportPath()/];
[/if]
[/for]
[if (ownedMember->filter(Operation).raisedException <> null)]
[for (self.hasName())]
import [genImportPath()/];
[/for]

[comment <%for (ownedMember.filter("Operation").raisedException){%>
import <%genImportPath%>;
<%}%> /][/if]

[/template]

[template public genImportPath(type : Type) post(trim())]
[if (getProperty('java.typeconversion.'.concat(name)) <> null)]
[getProperty('java.typeconversion.'.concat(name))/]
[elseif (packagePath('.').size() = 0)]
[genName()/]
[else]
[packagePath('.')/].[genName()/]
[/if]

The line:

import [self.oclAsType(Type).genImportPath()/];

Calls the genImportPath template. I have been debugging it and I think the previous code is ok, I mean I had an attribute which was a reference to another Class and it took it, I dont know if maybe the problem is with the oclAsType conversion. The fact is that when it reaches:

[if (getProperty('java.typeconversion.'.concat(name)) <> null)]

It returns an Ocl_Invalid Class. At first it wasnt using the concat operator, it was using '+' but I thought that could be wrong and I used concat(), thats the only change I made.

The java.tpeconversion.Integer or .Float etc does exist, this is the file:

# Copyright (c) 2005-2009 Obeo
#
# This file allows to define type translation between
# types used in the uml model and types generated in
# the generated files.

#java.typeconversion.Integer=int
#java.typeconversion.Boolean=boolean
java.typeconversion.Float=double
java.typeconversion.Double=Double

java.defaultvalue.Integer=0
java.defaultvalue.Boolean=true
java.defaultvalue.Float=0.0

I have tried with several UML models and they all get the same error.

Also, I think the code that searchs for the types works ok but I post it anyways:

[template public getTypeList(classifier : Classifier)]

[/template]

[template public getTypeList(class : Class)]
[ownedAttribute.type->asBag()->union(getAssociations().navigableOwnedEnd- >select(type<>current(1)).type)->union((ownedOperation.ownedParameter.type)- >asBag())->union(general)->asBag()->union((nestedClassifier- >filter(Class).getTypeList().oclAsType(Type))->asBag())/]
[/template]

[template public getTypeList(interface : Interface)]
[ownedAttribute.type->asBag()->union(getAssociations().navigableOwnedEnd- >select(type<>current(1)).type)->union((ownedOperation.ownedParameter.type)- >asBag())->union(general)->asBag()->union((nestedClassifier- >filter(Class).getTypeList().oclAsType(Type))->asBag())/]
[/template]

I will continue trying to figure it out but I will thank any help Smile
Re: [Acceleo] Debugging problems with propertys [message #542527 is a reply to message #542314] Fri, 25 June 2010 08:08 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060705050602080506060607
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Daniel,

From afar, I have no idea what you'd get these exceptions. "undefined
condition of if" means that the if's condition is "invalid" or "null";
in this case i'd say "invalid". That would mean
"getProperty('java.typeconversion.'.concat(name))" returns an invalid
result. You could try it step by step :

[name/] <= type name
['java.typeconversion.'.concat(name)/] <= property key
[getProperty('java.typeconversion.'.concat(name))/] <= property value

and see which of the three fails.

Laurent Goubet
Obeo

Daniel wrote:
> Hi again.
>
> I have been debugging the migrated uml2java module and now it does
> generate files but an exception is raised and it doesnt let me call it
> using Java. These are the exceptions:
>
> FIRST
>
> 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 24 16:01:06 CEST 2010
> Undefined condition of "If" at line 37 in Module import for block if
> (self.getProperty('java.typeconversion.'.concat(self.name)). <>(null)).
> Last recorded value of self was .
>
> org.eclipse.acceleo.engine.AcceleoEvaluationException: Undefined
> condition of "If" at line 37 in Module import for block if
> (self.getProperty('java.typeconversion.'.concat(self.name)). <>(null)).
> Last recorded value of self was .
> at import.genImportPath(Type)(import.mtl:37)
> at import.genImportPath(Type)(import.mtl:36)
> at import.genImport(Classifier)(import.mtl:0)
> at import.genImport(Classifier)(import.mtl:0)
> at import.genImport(Classifier)(import.mtl:21)
> at import.genImport(Classifier)(import.mtl:20)
> at import.genImport(Classifier)(import.mtl:7)
> at class.classJava(Class)(class.mtl:0)
> at class.classJava(Class)(class.mtl:10)
> at class.classJava(Class)(class.mtl:8)
> at main.main(Package)(main.mtl:0)
> at main.main(Package)(main.mtl:0)
> at main.main(Package)(main.mtl:9)
>
> SECOND
>
> 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 24 16:01:06 CEST 2010
> Undefined condition of "If" at line 37 in Module import for block if
> (self.getProperty('java.typeconversion.'.concat(self.name)). <>(null)).
> Last recorded value of self was [Lorg.eclipse.uml2.uml.Classifier;@1d6d605.
>
> org.eclipse.acceleo.engine.AcceleoEvaluationException: Undefined
> condition of "If" at line 37 in Module import for block if
> (self.getProperty('java.typeconversion.'.concat(self.name)). <>(null)).
> Last recorded value of self was [Lorg.eclipse.uml2.uml.Classifier;@1d6d605.
> at import.genImportPath(Type)(import.mtl:37)
> at import.genImportPath(Type)(import.mtl:36)
> at import.genImport(Classifier)(import.mtl:0)
> at import.genImport(Classifier)(import.mtl:26)
> at import.genImport(Classifier)(import.mtl:25)
> at import.genImport(Classifier)(import.mtl:7)
> at class.classJava(Class)(class.mtl:0)
> at class.classJava(Class)(class.mtl:10)
> at class.classJava(Class)(class.mtl:8)
> at main.main(Package)(main.mtl:0)
> at main.main(Package)(main.mtl:0)
> at main.main(Package)(main.mtl:9)
>
> THIRD
>
> 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 24 16:01:06 CEST 2010
> Evaluation failed with an exception: (no message)
>
> java.lang.IllegalArgumentException
> at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.navigatePro
> perty(EcoreEvaluationEnvironment.java:197)
> at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.navigatePro
> perty(EcoreEvaluationEnvironment.java:1)
> at org.eclipse.ocl.EvaluationVisitorImpl.visitPropertyCallExp(E
> valuationVisitorImpl.java:1925)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitPropertyCallExp(AcceleoEvaluationVisitor.ja va:999)
> at org.eclipse.ocl.ecore.impl.PropertyCallExpImpl.accept(Proper
> tyCallExpImpl.java:238)
> at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp(
> EvaluationVisitorImpl.java:561)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
> at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(Opera
> tionCallExpImpl.java:390)
> at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp(
> EvaluationVisitorImpl.java:174)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
> 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.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.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:458)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 462)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation
> Visitor.java:822)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> 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.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.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.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:458)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 462)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.ja va:423)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 469)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation
> Visitor.java:822)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:316)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 476)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation
> Visitor.java:822)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> 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.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.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 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: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: 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)
>
> 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
>
>
> Error
> Thu Jun 24 16:01:06 CEST 2010
> Evaluation failed with an exception: (no message)
>
> java.lang.IllegalArgumentException
> at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.navigatePro
> perty(EcoreEvaluationEnvironment.java:197)
> at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.navigatePro
> perty(EcoreEvaluationEnvironment.java:1)
> at org.eclipse.ocl.EvaluationVisitorImpl.visitPropertyCallExp(E
> valuationVisitorImpl.java:1925)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitPropertyCallExp(AcceleoEvaluationVisitor.ja va:999)
> at org.eclipse.ocl.ecore.impl.PropertyCallExpImpl.accept(Proper
> tyCallExpImpl.java:238)
> at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp(
> EvaluationVisitorImpl.java:561)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
> at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(Opera
> tionCallExpImpl.java:390)
> at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp(
> EvaluationVisitorImpl.java:174)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:988)
> 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.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.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:458)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 462)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation
> Visitor.java:822)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.ja va:423)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 469)
> 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
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 462)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation
> Visitor.java:822)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:316)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 476)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation
> Visitor.java:822)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 483)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 2)
> 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.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.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:771)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 456)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:90 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: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: 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)
>
>
> They come from this code:
>
> [template public genImport(classifier : Classifier) post(trim())]
> [comment millones de cambios CONCRETAMENTE UNIONS/]
> [if (not (isArray()))]
> [if((ownedMember->
> filter(Operation).ownedParameter.oclAsType(MultiplicityEleme nt)-
> >union(ownedMember->filter(Property).oclAsType(MultiplicityElement))-
> >union(getAssociations().navigableOwnedEnd))->select((upper = -1 or
> upper > 1) and isOrdered) <> null)]
> [comment Collection class for ordered multiple elements /]import
> [getOrderedCollectionClassPath()/];
> [/if]
> [if((ownedMember->
> filter(Operation).ownedParameter.oclAsType(MultiplicityEleme nt)-
> >union(ownedMember->filter(Property).oclAsType(MultiplicityElement))-
> >union(getAssociations().navigableOwnedEnd))->select((upper = -1 or
> upper > 1) and not isOrdered) <> null)]
> [comment Collection class for not ordered multiple elements /]import
> [getNotOrderedCollectionClassPath()/];
> [/if]
> [comment If no multiple elements, do nothing! /][/if]
>
> [comment Import referenced model elements /]
> [comment millones de cambios, concretamente los OCL AS TYPE/]
> [for (getTypeList()->asOrderedSet()->asSequence())]
> [if (self.oclAsType(Type).genImportPath().index('.') <> -1)]
> import [self.oclAsType(Type).genImportPath()/];
> [/if]
> [/for]
> [if (ownedMember->filter(Operation).raisedException <> null)]
> [for (self.hasName())]
> import [genImportPath()/];
> [/for]
>
> [comment <%for (ownedMember.filter("Operation").raisedException){%>
> import <%genImportPath%>;
> <%}%> /][/if]
>
> [/template]
>
> [template public genImportPath(type : Type) post(trim())]
> [if (getProperty('java.typeconversion.'.concat(name)) <> null)]
> [getProperty('java.typeconversion.'.concat(name))/]
> [elseif (packagePath('.').size() = 0)]
> [genName()/]
> [else]
> [packagePath('.')/].[genName()/]
> [/if]
>
> The line:
>
> import [self.oclAsType(Type).genImportPath()/];
>
> Calls the genImportPath template. I have been debugging it and I think
> the previous code is ok, I mean I had an attribute which was a reference
> to another Class and it took it, I dont know if maybe the problem is
> with the oclAsType conversion. The fact is that when it reaches:
>
> [if (getProperty('java.typeconversion.'.concat(name)) <> null)]
>
> It returns an Ocl_Invalid Class. At first it wasnt using the concat
> operator, it was using '+' but I thought that could be wrong and I used
> concat(), thats the only change I made.
>
> The java.tpeconversion.Integer or .Float etc does exist, this is the file:
>
> # Copyright (c) 2005-2009 Obeo
> #
> # This file allows to define type translation between
> # types used in the uml model and types generated in # the generated files.
>
> #java.typeconversion.Integer=int
> #java.typeconversion.Boolean=boolean
> java.typeconversion.Float=double
> java.typeconversion.Double=Double
>
> java.defaultvalue.Integer=0
> java.defaultvalue.Boolean=true
> java.defaultvalue.Float=0.0
>
> I have tried with several UML models and they all get the same error.
>
> Also, I think the code that searchs for the types works ok but I post it
> anyways:
>
> [template public getTypeList(classifier : Classifier)]
>
> [/template]
>
> [template public getTypeList(class : Class)]
> [ownedAttribute.type->asBag()->union(getAssociations().navigableOwnedEnd-
> >select(type<>current(1)).type)->union((ownedOperation.ownedParameter.type)-
> >asBag())->union(general)->asBag()->union((nestedClassifier-
> >filter(Class).getTypeList().oclAsType(Type))->asBag())/]
> [/template]
>
> [template public getTypeList(interface : Interface)]
> [ownedAttribute.type->asBag()->union(getAssociations().navigableOwnedEnd-
> >select(type<>current(1)).type)->union((ownedOperation.ownedParameter.type)-
> >asBag())->union(general)->asBag()->union((nestedClassifier-
> >filter(Class).getTypeList().oclAsType(Type))->asBag())/]
> [/template]
>
> I will continue trying to figure it out but I will thank any help :)
>


--------------060705050602080506060607
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=
--------------060705050602080506060607--
Re: [Acceleo] Debugging problems with propertys [message #542589 is a reply to message #542527] Fri, 25 June 2010 11:51 Go to previous messageGo to next message
Daniel  is currently offline Daniel Friend
Messages: 44
Registered: June 2010
Member
Ok, the problem was with name, thats when it raises the OCL_Invalid Class.

I am doing the debugging with a model with a package named gg, inside there is a class named Clase1 with an attribute named atributo1 which is an Integer.

The template searches for all the types to import, so it would find the Integer, in fact it finds it.

So I tried to see why it couldnt access to the name of the Type integer, and the type the debugging gave me was:

org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@1138f0c (eProxyURI: pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r)

So the problem seems to be that it doesnt find the library.

So I went to the Main.java where I had defined the resource Set:

/**
* This can be used to update the resource set's package registry with all needed EPackages.
*
* @param resourceSet
* The resource set which registry has to be updated.
* @not-generated
*/
@Override
public void registerPackages(ResourceSet resourceSet) {
super.registerPackages(resourceSet);
resourceSet.getPackageRegistry().put(org.eclipse.uml2.uml.UM LPackage.eINSTANCE.getNsURI(), org.eclipse.uml2.uml.UMLPackage.eINSTANCE);
// NASGUN
// TODO If you need additional package registrations, do them here. The following line is an example for UML.
resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
resourceSet.getPackageRegistry().put("http://www.eclipse.org/uml2/2.1.0/UML", UMLPackage.eINSTANCE);
}

/**
* This can be used to update the resource set's resource factory registry with all needed factories.
*
* @param resourceSet
* The resource set which registry has to be updated.
* @not-generated
*/
@Override
public void registerResourceFactories(ResourceSet resourceSet) {
super.registerResourceFactories(resourceSet);
// NASGUN
// TODO If you need additional resource factories registrations, do them here. The following line is an example for UML.
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
Map<URI, URI> uriMap = resourceSet.getURIConverter().getURIMap();
URI uri = URI.createURI(" jar:file:/C:/Helioslegoub/eclipse/plugins/org.eclipse.uml2.u ml.resources_3.1.0.v201005031530.jar!/ ");
uriMap.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri.appendSegment("libraries").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri.appendSegment("metamodels").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.PROFILES_PATHMAP), uri.appendSegment("profiles").appendSegment(""));

}

And I checked it and the package: " jar:file:/C:/Helioslegoub/eclipse/plugins/org.eclipse.uml2.u ml.resources_3.1.0.v201005031530.jar!/ " does exist. So I dont know what is going wrong and why it cant resolve the name. Do you know why could it be?

As a side note I would like to ask you something, could it be possible to use "platform:/plugin/org.eclipse.uml2.uml.resources/libraries/" instead of the path to the jar file so it doesnt change when we change the machine where the module is executing?

Thank you very much.
Re: [Acceleo] Debugging problems with propertys [message #542624 is a reply to message #542589] Fri, 25 June 2010 13:22 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020602020104000604050609
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

I believe both the problem and your last question would be better asked
on the UML newsgroup / forum as I can't answer for sure : as long as
your running the generation standalone, I believe you are stuck with
specifying the whole "jar" path to the libraries.

Laurent

Daniel wrote:
> Ok, the problem was with name, thats when it raises the OCL_Invalid Class.
>
> I am doing the debugging with a model with a package named gg, inside
> there is a class named Clase1 with an attribute named atributo1 which is
> an Integer.
>
> The template searches for all the types to import, so it would find the
> Integer, in fact it finds it.
>
> So I tried to see why it couldnt access to the name of the Type integer,
> and the type the debugging gave me was:
>
> mailto:org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@1138f0c
> (eProxyURI: pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Intege r)
>
> So the problem seems to be that it doesnt find the library.
>
> So I went to the Main.java where I had defined the resource Set:
>
> /**
> * This can be used to update the resource set's package registry
> with all needed EPackages.
> * * @param resourceSet
> * The resource set which registry has to be updated.
> * @not-generated
> */
> @Override
> public void registerPackages(ResourceSet resourceSet) {
> super.registerPackages(resourceSet);
> resourceSet.getPackageRegistry().put(org.eclipse.uml2.uml.UM
> LPackage.eINSTANCE.getNsURI(), org.eclipse.uml2.uml.UMLPackage.eINSTANCE);
> // NASGUN
> // TODO If you need additional package registrations, do them here.
> The following line is an example for UML.
> resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI,
> UMLPackage.eINSTANCE);
> resourceSet.getPackageRegistry().put("http://www.eclipse.org/uml2/2.1.0/UML",
> UMLPackage.eINSTANCE);
> }
>
> /**
> * This can be used to update the resource set's resource factory
> registry with all needed factories.
> * * @param resourceSet
> * The resource set which registry has to be updated.
> * @not-generated
> */
> @Override
> public void registerResourceFactories(ResourceSet resourceSet) {
> super.registerResourceFactories(resourceSet);
> // NASGUN
> // TODO If you need additional resource factories registrations, do
> them here. The following line is an example for UML.
> resourceSet.getResourceFactoryRegistry().getExtensionToFacto
> ryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
> Map<URI, URI> uriMap = resourceSet.getURIConverter().getURIMap();
> URI uri = URI.createURI("
> jar:file:/C:/Helioslegoub/eclipse/plugins/org.eclipse.uml2.u
> ml.resources_3.1.0.v201005031530.jar!/ ");
> uriMap.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP),
> uri.appendSegment("libraries").appendSegment(""));
> uriMap.put(URI.createURI(UMLResource.METAMODELS_PATHMAP),
> uri.appendSegment("metamodels").appendSegment(""));
> uriMap.put(URI.createURI(UMLResource.PROFILES_PATHMAP),
> uri.appendSegment("profiles").appendSegment(""));
>
> }
>
> And I checked it and the package: "
> jar:file:/C:/Helioslegoub/eclipse/plugins/org.eclipse.uml2.u
> ml.resources_3.1.0.v201005031530.jar!/ " does exist. So I dont know what
> is going wrong and why it cant resolve the name. Do you know why could
> it be?
>
> As a side note I would like to ask you something, could it be possible
> to use "platform:/plugin/org.eclipse.uml2.uml.resources/libraries/"
> instead of the path to the jar file so it doesnt change when we change
> the machine where the module is executing?
>
> Thank you very much.


--------------020602020104000604050609
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=
--------------020602020104000604050609--
Re: [Acceleo] Debugging problems with propertys [message #643550 is a reply to message #542589] Tue, 07 December 2010 11:18 Go to previous message
dieppi is currently offline dieppiFriend
Messages: 27
Registered: November 2010
Junior Member
Hi Daniel,

i have the same problem.

org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@569c60 (eProxyURI: pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n)

Have you a solution?

Best regards
Maik

[Updated on: Tue, 07 December 2010 11:20]

Report message to a moderator

Previous Topic:[Xpand] expand in a dynamic binding manner
Next Topic:[xPand] class not found org.eclipse.jface.text.BadLocationException
Goto Forum:
  


Current Time: Fri Nov 08 21:57:04 GMT 2024

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

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

Back to the top