Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Problems with uml2 3.0.0 Profiles and typesystem.uml2(NPE in StereotypeType.normalizedName(String) line: 260 )
Problems with uml2 3.0.0 Profiles and typesystem.uml2 [message #499726] Mon, 23 November 2009 20:49 Go to next message
Andre Albert is currently offline Andre AlbertFriend
Messages: 25
Registered: July 2009
Junior Member
Hello,

during last to days i had several problem while migrating to the latest uml2 3.0.0

My eclipse UmlEditor had successfully update namespace URI to the new 3.0.0 UML version.
But in all my profiles, the ecore elements defining the Profile still referencing http://www.eclipse.org/uml2/2.0.0/UML
If i manually update these references, i am not able to apply this profile and use the containing stereotype.

Now if i am starting an MWE workflow i get NullPointerException with the following stacktrace:

2514463 ERROR WorkflowRunner -
java.lang.NullPointerException
at org.eclipse.xtend.typesystem.uml2.profile.StereotypeType.nor malizedName(StereotypeType.java:260)
at org.eclipse.xtend.typesystem.uml2.profile.StereotypeType.get FullName(StereotypeType.java:228)
at org.eclipse.xtend.typesystem.uml2.profile.StereotypeType.get SuperTypes(StereotypeType.java:213)
at org.eclipse.xtend.typesystem.AbstractTypeImpl.internalIsAssi gnableFrom(AbstractTypeImpl.java:164)
at org.eclipse.xtend.typesystem.AbstractTypeImpl.isAssignableFr om(AbstractTypeImpl.java:160)
at org.eclipse.xtend.expression.TypeSystemImpl$1.createNew(Type SystemImpl.java:151)
at org.eclipse.xtend.expression.TypeSystemImpl$1.createNew(Type SystemImpl.java:1)
at org.eclipse.internal.xtend.util.WeakCache.get(WeakCache.java :25)
at org.eclipse.xtend.expression.TypeSystemImpl$1.get(TypeSystem Impl.java:141)
at org.eclipse.xtend.expression.TypeSystemImpl$1.get(TypeSystem Impl.java:1)
at org.eclipse.xtend.expression.TypeSystemImpl.getType(TypeSyst emImpl.java:162)
at org.eclipse.xtend.expression.ExecutionContextImpl.getType(Ex ecutionContextImpl.java:214)
at org.eclipse.internal.xpand2.ast.ExpandStatement.invokeDefini tion(ExpandStatement.java:173)
at org.eclipse.internal.xpand2.ast.ExpandStatement.evaluateInte rnal(ExpandStatement.java:145)
at org.eclipse.internal.xpand2.ast.Statement.evaluate(Statement .java:39)
at org.eclipse.internal.xpand2.ast.AbstractDefinition.evaluate( AbstractDefinition.java:175)
at org.eclipse.internal.xpand2.ast.ExpandStatement.invokeDefini tion(ExpandStatement.java:195)
at org.eclipse.internal.xpand2.ast.ExpandStatement.evaluateInte rnal(ExpandStatement.java:167)
at org.eclipse.internal.xpand2.ast.Statement.evaluate(Statement .java:39)
at org.eclipse.xpand2.Generator.invokeInternal2(Generator.java: 334)
at org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflo wComponent.invokeInternal(AbstractExpressionsUsingWorkflowCo mponent.java:191)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invok e(AbstractWorkflowComponent.java:124)
at org.eclipse.emf.mwe.core.container.CompositeComponent.intern alInvoke(CompositeComponent.java:101)
at org.eclipse.emf.mwe.core.container.CompositeComponent.invoke (CompositeComponent.java:86)
at org.eclipse.emf.mwe.core.WorkflowRunner.executeWorkflow(Work flowRunner.java:412)
at org.eclipse.emf.mwe.core.WorkflowRunner.run(WorkflowRunner.j ava:292)
at org.eclipse.emf.mwe.core.WorkflowRunner.main(WorkflowRunner. java:239)


the problem occurs while init the superTypes Set of the StereotypeType. It asks the stereotype for extended metaclasses
which will return pathmap://UML_METAMODELS/UML.metamodel.uml#Component (i.e. the element applied with the stereotype)
calling getName on this NamedElement returns null.

My MWE Workflow basically looks like this:

<workflow>

<bean class="org.eclipse.xtend.typesystem.uml2.Setup" />

<bean id="uml2" class="org.eclipse.xtend.typesystem.uml2.UML2MetaModel"/>

<bean id="projectProfile" class="org.eclipse.xtend.typesystem.uml2.profile.ProfileMetaModel ">
<profile value="${projectProfileFile}"/>
</bean>

<component class="org.eclipse.xtend.typesystem.emf.XmiReader">
<modelFile value="${modelFile}"/>
<outputSlot value="${modelSlot}"/>
</component>

<component id="generator" class="org.eclipse.xpand2.Generator" skipOnErrors="true" srcPath="${baseDir}">
<metaModel idRef="uml2"/>
<metaModel idRef="projectProfile"/>

<expand value="templates::Root::Root FOR ${modelSlot}"/>

<outlet path="${srcGenPath}">
<postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" configFile="oaw/formatter.xml" />
</outlet>
</component>
</workflow>



Does anyone have similar problems?
What might be a solution to this

Greetings,
Andre
Re: Problems with uml2 3.0.0 Profiles and typesystem.uml2 [message #499937 is a reply to message #499726] Tue, 24 November 2009 14:55 Go to previous messageGo to next message
Andre Albert is currently offline Andre AlbertFriend
Messages: 25
Registered: July 2009
Junior Member
It seems to be that all UML types do not have a type name.
While debugging the PrimitiveTypes (such as pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String) objects do have null as name but not "String" or similar.
Besides eStorage each property of PrimitiveTypeImpl has a null value

Is there a reason why uml primitive types or uml metaclasses are not initialized properly.

Is this rather a problem of xpand workflows?

thanks
Re: Problems with uml2 3.0.0 Profiles and typesystem.uml2 [message #500049 is a reply to message #499726] Tue, 24 November 2009 19:20 Go to previous message
Andre Albert is currently offline Andre AlbertFriend
Messages: 25
Registered: July 2009
Junior Member
Sorry. this was not a uml2 issue.
As i found out, i forgot to update some worklfow components while updating from oaw to eclipse.xpand

The used:


<component class="org.eclipse.xtend.typesystem.emf.XmiReader">
<modelFile value="${modelFile}"/>
<outputSlot value="${modelSlot}"/>
</component>

was marked as deprecated (which was not visible in the mwe xml file)

using

<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="${modelFile}" />
<modelSlot value="${modelSlot}" />
</component>

instead solved this problem

Previous Topic:C++ & UML
Next Topic:Problems with uml2 3.0.0 Profiles and typesystem.uml2
Goto Forum:
  


Current Time: Tue Apr 16 18:24:43 GMT 2024

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

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

Back to the top