Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL][UML] TargetInvocationException on getValue(Stereotype, nameOfTaggedValue)
[ATL][UML] TargetInvocationException on getValue(Stereotype, nameOfTaggedValue) [message #64210] Thu, 18 October 2007 09:48 Go to next message
Eclipse UserFriend
Originally posted by:

Hello all,

while being shure, that my modelElement has the specified stereotype and
tagged value I get sometimes a magic TargetInvocationException on
calling getValue(...) stemming from an IllegalArgumentException thrown in
org.exlipse.uml2.uml.internal.operations.ElementOperations line #524

There are two cases very similiar to each other. In the first case the
exception is not thrown, in the second it is thrown:

1. I get the modelElementA (with the taggedValue) by calling a helper
from a matchedRule matching on a different(!) modelElementB.
The helper fetches the needed taggedValue of the modelElementA like this:

let modelElementA : Uml!Class = thisModule.inClasses('In')->select(c |
c.hasStereotype('DisplayWidth'))->first() in
let stereotype : Uml!Stereotype =
'DeviceProfile') in
modelElementA.getValue(stereotype, '@value')

where inClasses(..), hasStereotype(..) and getStereotypeFromProfile(..)
are selfdefined helpers

2. I try to get the needed modelElementA (with the taggedValue)
beforehand in the entrypoint rule, where I call the helper described in (1.)

In the second case I get the above mentioned exception.
What can be the reason?
Is the result dependent on the time, when I try to get the TaggedValue??

Thanks in advance

Andreas Schwab
Re: [ATL][UML] TargetInvocationException on getValue(Stereotype, nameOfTaggedValue) [message #64310 is a reply to message #64210] Thu, 18 October 2007 14:42 Go to previous message
Eclipse UserFriend
Originally posted by:

Hello all,

solved this problem too, but I'm not sure why:

possible reason: eclipse environment refresh action cleared some
outdated wrong states

Previous Topic:Toolset for the modelling\animation of electronic messages
Next Topic:[ATL][UML] Superimposition Exception "Pattern not equal for execution environment and module in
Goto Forum:

Current Time: Sat Aug 13 03:25:24 GMT 2022

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

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

Back to the top