[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[henshin-dev] NPE when using Attribute in UML instance models
|
Hello again,
working on UML models, I ran into another error that I hope you can help
me with.
My UML instance model is:
Model --packagedElement--> Component (name:WebShop)
My transformation rule is:
<<preserve>> Model --<<delete>>PackagedElement---> <<delete>> Component
(name="WebShop")
This gives me a NPE:
Exception in thread "main" java.lang.NullPointerException
at
org.eclipse.emf.henshin.interpreter.info.VariableInfo.createConstraints(VariableInfo.java:168)
at
org.eclipse.emf.henshin.interpreter.info.VariableInfo.createVariables(VariableInfo.java:104)
at
org.eclipse.emf.henshin.interpreter.info.VariableInfo.<init>(VariableInfo.java:70)
at
org.eclipse.emf.henshin.interpreter.info.RuleInfo.<init>(RuleInfo.java:29)
at
org.eclipse.emf.henshin.interpreter.impl.EngineImpl.getRuleInfo(EngineImpl.java:499)
at
org.eclipse.emf.henshin.interpreter.impl.EngineImpl$MatchFinder.<init>(EngineImpl.java:197)
at
org.eclipse.emf.henshin.interpreter.impl.EngineImpl$MatchGenerator.iterator(EngineImpl.java:157)
at
org.eclipse.emf.henshin.interpreter.impl.RuleApplicationImpl.execute(RuleApplicationImpl.java:90)
at init.Example.run(Example.java:61)
at init.Example.main(Example.java:75)
in createConstraints(..) line 168 is:
attributeValue = castDown(attributeValue,
attribute.getType().getEType().getInstanceClassName());
with attribute.getType().getEType() being null.
attribute.getType() resolves to
"org.eclipse.emf.ecore.impl.EAttributeImpl@4a646ffe (eProxyURI:
../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name)"
That "name" attribute has the EType "String [java.lang.String]" in the
meta model.
Is this a bug in Henshin, or do I use the API in a wrong way?
I attached an example project.
Best regards
Marco
Attachment:
test.henshin.uml.zip
Description: Zip archive