[Acceleo] Null pointer exception using profiles [message #673770] |
Tue, 24 May 2011 13:25  |
Eclipse User |
|
|
|
hi all,
I have a simple transformation on a model written using papyrus. The model has only two classes, one of which has applied a stereotype with two tagged values. The profile was written using papyrus.
When I run the transformation a Null pointer exception is raised.
The simple transformation is :
[comment encoding = UTF-8 /]
[module generate('http://www.eclipse.org/uml2/3.0.0/UML')/]
[query public hasStereotype(e : Element, stereoTypeName: String) : Boolean =
not self.getAppliedStereotype(stereoTypeName).oclIsUndefined()/]
[query public getTaggedValue(e:Element, stereoTypeName: String, propName :String) : String =
e.getValue(e.getAppliedStereotype(stereoTypeName), propName)
/]
[template public generate(aClass : Class)]
[comment @main /]
[file ('test.txt', true, 'UTF-8')]
[if (aClass.hasStereotype('profile::Store'))]
Class with stereotype: [aClass.name/]
[/if]
[/file]
[/template]
The stack trace is :
java.lang.NullPointerException
at org.eclipse.acceleo.engine.internal.environment.DynamicModulesURIConverter.dynamicNormalize(DynamicModulesURIConverter.java:303)
at org.eclipse.acceleo.engine.internal.environment.DynamicModulesURIConverter.normalize(DynamicModulesURIConverter.java:77)
at org.eclipse.uml2.common.util.CacheAdapter$InverseCrossReferencer.normalizeURI(CacheAdapter.java:68)
at org.eclipse.uml2.common.util.CacheAdapter$InverseCrossReferencer.addProxy(CacheAdapter.java:101)
at org.eclipse.uml2.common.util.CacheAdapter.selfAdapt(CacheAdapter.java:526)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.notifyChanged(ECrossReferenceAdapter.java:430)
at org.eclipse.uml2.common.util.CacheAdapter.notifyChanged(CacheAdapter.java:342)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.unload(ResourceImpl.java:1646)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.postGenerate(AbstractAcceleoGenerator.java:453)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.generate(AbstractAcceleoGenerator.java:145)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.doGenerate(AbstractAcceleoGenerator.java:120)
at profileTestAcceleo2.files.Generate.doGenerate(Generate.java:148)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoLaunchOperation.run(AcceleoLaunchOperation.java:119)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:225)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:128)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchDelegate.launch(AcceleoLaunchDelegate.java:53)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
What is wrong?
Thank in advance.
P.S. The output file is generated as expected.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.28278 seconds