Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL plugin - stereotype is not applicable error
ATL plugin - stereotype is not applicable error [message #1814101] Tue, 03 September 2019 16:24 Go to next message
Khoa Nguyen is currently offline Khoa NguyenFriend
Messages: 7
Registered: May 2019
Junior Member
Hi,

I am working an ATL plugin which uses ATL transformation with stereotypes.
The ATL code works fine. However, I got below error when running it in the ATL plugin. Is there anyone have a solution to this problem?

Thank you in advance.

ATL transformation rule
rule Vulnerability {
	from
		x: XMI!Vulnerability
	to
		vulner: UML!DataStoreNode (
			name <- x.name,
			upperBound <- vulUpperBound
		),
		vulUpperBound: UML!LiteralInteger (
			value <- 1
		)		
	do {
		vulner.applyStereotype(thisModule.getStereotype('Vulnerability')); 
	}
}


ATL plugin error
org.eclipse.m2m.atl.engine.emfvm.VMException
Java Stack:
org.eclipse.m2m.atl.engine.emfvm.VMException
	at org.eclipse.m2m.atl.engine.emfvm.adapter.UML2ModelAdapter.finalizeModel(UML2ModelAdapter.java:51)
	at org.eclipse.m2m.atl.engine.emfvm.lib.ExecEnv.terminated(ExecEnv.java:2559)
	at org.eclipse.m2m.atl.engine.emfvm.ASM.run(ASM.java:210)
	at org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.internalLaunch(EMFVMLauncher.java:170)
	at org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.launch(EMFVMLauncher.java:139)
	at org.eclipse.m2m.atl.umltransfromation.files.UMLTransfromation.doUMLTransfromation(UMLTransfromation.java:175)
	at org.eclipse.m2m.atl.umltransfromation.files.UMLTransfromation.main(UMLTransfromation.java:88)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.m2m.atl.engine.emfvm.adapter.UML2ModelAdapter.applyDelayedInvocations(UML2ModelAdapter.java:136)
	at org.eclipse.m2m.atl.engine.emfvm.adapter.UML2ModelAdapter.finalizeModel(UML2ModelAdapter.java:49)
	... 6 more
Caused by: java.lang.IllegalArgumentException: stereotype "RootElement::Vulnerability" is not applicable to DataStoreNode
	at org.eclipse.uml2.uml.internal.operations.ElementOperations.applyStereotype(ElementOperations.java:1482)
	at org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereotype(ElementImpl.java:511)
	... 12 more
Re: ATL plugin - stereotype is not applicable error [message #1814602 is a reply to message #1814101] Fri, 13 September 2019 19:07 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

The UML2 plug-in does not allow you to apply the stereotype 'Vulnerability' to an element of type DataStoreNode. If your UML profile does allow this - you said the ATL code did work when run in Eclipse - then you may have a metamodel aliasing problem. Metamodel aliasing basically means you somehow have the same metamodel (e.g. UML) loaded in memory twice, and one model's elements reference the metaclasses of the first metamodel instance, while another model (the profile?) references the metaclasses of another instance of the same metamodel.

Cheers,
Dennis
Re: ATL plugin - stereotype is not applicable error [message #1822865 is a reply to message #1814602] Mon, 16 March 2020 08:14 Go to previous message
Mubeen Aslam is currently offline Mubeen AslamFriend
Messages: 3
Registered: November 2019
Junior Member
After adding the papyrus application in eclipse, I am unable to drag any object from the palet. I cannot drag the stereotype. Every thing is infront of me and active but it does not come on the editor. i am unable to draw the class diagram.
can any one help me plzzzzzzzzzzzzz
Previous Topic:[Quick Question] Composition and Referance Difference?
Next Topic:Obscure error while saving an output model...
Goto Forum:
  


Current Time: Thu Apr 25 00:55:22 GMT 2024

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

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

Back to the top