Replies: 3 comments
-
|
Additional information: this issue appears when executing the transformation on a Linux server in headless mode but it does not when running on Windows with the exact same inputs, whether the execution mode is headless or full IDE. |
Beta Was this translation helpful? Give feedback.
-
|
The investagiations I made tend to suggest that the error I get comes from the fact that the element the code tries to delete isn't directly owned by the Resource but only indirectly. Basically, this would means that, assuming the element to be deleted is MyClass, the code would try to do something like:
While that class would actually be owned by a packaged located somewhere on that resource. The workaround that was proposed is to enforce the "detachment" of the element in the imperative part of the rule so that the deleted element would "fall" directly under the resource, using something like this code: However by doing so, another kind of error appears: So it looks like the previous operation does not actually put the element to be deleted in the list of "root" elements but simply removes it from all the "content" lists. Also, keeping in mind that this issue does not appear on Windows, even in headless mode, I wonder what are the specificities of the Linux server that could explain that unexpected behavior. Understanding it could help in finding the solution. |
Beta Was this translation helpful? Give feedback.
-
|
EMFTVM does a lot of (pre-)processing on elements marked for deletion and any manual preprocessing should not be required:
It is at 2.b. that you get a That said, you initial problem (without workaround) should not have happened. This point is reinforced by the fact that your transformation runs correctly under Eclipse in Windows. The fact that your error message involves eProxyURIs suggests that EMF could not load referenced models correctly using your Ant script. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I got this error by executing a refinement transformation that includes a rule that deletes elements:
[emftvm.run] org.eclipse.m2m.atl.emftvm.util.VMException: Error while deleting element 16541651:UML!Class from IN: Element org.eclipse.uml2.uml.internal.impl.ClassImpl@16541651 (eProxyURI: #_19_0_2_78901bc_1638945553524_148615_46043) not contained as a root element in this modelHere is the rule that generate it:
rule removes { from src: UML!Element (src.isRemoved()) }The isRemoved() operation is an helper that checks the conditions defined for the deletion of the elements. The transformation is executed on a Linux server and in headless mode via an Ant script.
I remember I experienced deletions issues with previous ATL released, but this one does not look the same. What does it actually mean?
Beta Was this translation helpful? Give feedback.
All reactions