Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » IllegalArgumentException: Error, when applying a stereotype
IllegalArgumentException: Error, when applying a stereotype [message #664911] Tue, 12 April 2011 13:26
Sally  is currently offline Sally Friend
Messages: 16
Registered: March 2011
Junior Member
Hi all,

When I'm trying to apply a UML profile and stereotype to a UML class diag. , the profile is correctly applied to the model, but I got this error for the stereotype.

org.eclipse.m2m.atl.engine.emfvm.VMException: Exception during invocation of operation applyStereotype on org.eclipse.uml2.uml.internal.impl.ClassImpl@18c26d7 (name: CustomerInterface, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false)
Caused by: java.lang.IllegalArgumentException: org.eclipse.uml2.uml.internal.impl.StereotypeImpl@ed4b5a (name: variant, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false)at org.eclipse.uml2.uml.internal.operations.ElementOperations.a pplyStereotype(ElementOperations.java:1411)at org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereoty pe(ElementImpl.java:499)

The ATL file:
module transAppProfile2;
create OUT : UML from IN : UML, Pro : UML;

helper def : getStereotype(name : String) : UML!Stereotype =
UML!Stereotype.allInstancesFrom('Pro')->select(p | p.name = name)->first();

rule Model {
from
s : UML!Model
to
t : UML!Model ( name <- s.name)
do {
t.applyProfile(UML!Profile.allInstancesFrom('Pro')->select(p|p.name='ClassProject')- >first()); }
}
rule Class {
from
s : UML!Class
to
t : UML!Class (name <- s.name)
do {
t.applyStereotype(thisModule.getStereotype('variant'));}
}

I see in previous messages that this error is not new, but no one stated how it can be solved or why it's raised.

Does anyone know?

Thanks
Sally

Previous Topic:Request for information about AML
Next Topic:[ATL] How to specify/analyse a transformation
Goto Forum:
  


Current Time: Fri Apr 26 17:56:34 GMT 2024

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

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

Back to the top