eclipse-modisco / org.eclipse.modisco

Eclipse Public License 2.0
0 stars 0 forks source link

Bug 318638 - Transformation KDM 2 UML : exception EmptyStackException from ATL which was marked closed is still present #1051

Closed eclipse-modisco-bot closed 3 days ago

eclipse-modisco-bot commented 3 days ago

| --- | --- | | Bugzilla Link | 559016 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | Jan 10, 2020 07:57 EDT | | Modified | Feb 04, 2020 01:41 EDT | | Depends on | 468674, 559065 | | See also | 318638, 545980, 559060, Gerrit change https://git.eclipse.org/r/155735, 559115, 559506 | | Reporter | Sagar Kapadia |

Description

I can generate an xmi file but when I try to discover the UML model, the process stops in between and no .uml file is generated. The error log shows the following information. This bug seems to be identical to Bug 318638.

eclipse.buildId=4.14.0.I20191210-0610\ java.version=1.8.0_231\ java.vendor=Oracle Corporation\ BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US\ Framework arguments: -product org.eclipse.epp.package.jee.product\ Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

org.eclipse.modisco.kdm.uml2converter\ Error\ Fri Jan 10 18:13:07 IST 2020\ java.util.EmptyStackException (org.eclipse.modisco.kdm.uml2converter_1.2.0.201805182005)

java.util.EmptyStackException\ at java.util.Stack.peek(Stack.java:102)\ at java.util.Stack.pop(Stack.java:84)\ at org.eclipse.m2m.atl.engine.vm.ASMStackFrame.pop(ASMStackFrame.java:107)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:249)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)\ at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)\ at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.invoke(ASMEMFModelElement.java:926)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)\ at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)\ at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:357)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)\ at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)\ at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)\ at org.eclipse.m2m.atl.engine.vm.ASMInterpreter.(ASMInterpreter.java:346)\ at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:216)\ at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:127)\ at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:92)\ at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.runTransformation(AtlLaunchHelper.java:194)\ at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.runTransformation(AtlLaunchHelper.java:173)\ at org.eclipse.modisco.kdm.uml2converter.internal.KdmToUmlConverter.getUML2ModelFromKDMModelWithCustomTransformation(KdmToUmlConverter.java:115)\ at org.eclipse.modisco.kdm.uml2converter.internal.KdmToUmlConverter.getUML2ModelFromKDMModel(KdmToUmlConverter.java:80)\ at org.eclipse.modisco.kdm.uml2converter.DiscoverUmlModelFromKdmModel.basicDiscoverElement(DiscoverUmlModelFromKdmModel.java:89)\ at org.eclipse.modisco.kdm.uml2converter.DiscoverUmlModelFromKdmModel.basicDiscoverElement(DiscoverUmlModelFromKdmModel.java:1)\ at org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer.discoverElement(AbstractDiscoverer.java:93)\ at org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer.discoverElement(AbstractModelDiscoverer.java:183)\ at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener.discovererElement(MoDiscoMenuSelectionListener.java:352)\ at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener$1.run(MoDiscoMenuSelectionListener.java:115)\ at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 10, 2020 08:02

Created attachment 281442 Screenshot showing versions of components

MoDisco Installation.png

MoDisco Installation.png

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 04:10

This certainly not a BLOCKER for Modisco, no matter how much it pains you. Modisco is now on loife support so you may want to contribute a fix yourself.

You appear to be using a mish-mash of versions. Eclipse 2019-12 but a vintage MoDisco. Why not the aligned 1.5.0? ATL version not shown. ASM version not shown. Why not attach the configuration log so that ALL component versions are shown.

You provide no repro.

(In reply to Sagar Kapadia from comment #0)

This bug seems to be identical to Bug 318638.

Perhaps. But not all empty stacks are from a single cause. The problem is probably a bad transformation that fails to accommodate some cardinality, but may be an ATL bug.

Unfortunately in org.eclipse.modisco.kdm.uml2converter.tests.KdmToUml2WithTracesConverterTest

@Test\ @Ignore\ // @Ignore : FIXME TestModelUtils#compareModels must be rewritten for EMF Compare 2.0\ public void testKdmToUmlConverter_bug318638() throws Exception {

it appears that the regression test was disabled when the EMF Compare API changed and still awaits a rewrite.

(The same EMF Compare API instability probleme was avoided by OCL/QVTd by leveraging org.eclipse.xtext.util.EmfFormatter within org.eclipse.ocl.examples.xtext.tests.TestUtil.assertSameModel.)

Unfortunately again, the bug 315355 fix and its regression test predate the start of GIT whose history was seemingly not primed from its CVS predecessor. It is therefore unclear what fixes were provided by Bug 318638#c2

The Bug_318638.kdm for the test is 5314 lines of XML so difficult to guess what a particular pain point was. However it seems full of "void [0..1]" return types which seems very smelly.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 04:35

(In reply to Ed Willink from comment #2)

@Test @Ignore // @Ignore : FIXME TestModelUtils#compareModels must be rewritten for EMF Compare 2.0 public void testKdmToUmlConverter_bug318638() throws Exception {

it appears that the regression test was disabled when the EMF Compare API changed and still awaits a rewrite.

Un-@Ignore-ing the test in the hope of a EMF Compare API violation failure...

No. We get

Caused by: java.lang.IllegalArgumentException: The feature 'Model' is not a valid feature\ \ which suggests that UML has not been properly initialized.

On further investigation, the test was already ignored when first committed to GIT in 2012.

org.eclipse.modisco.kdm.uml2converter has a UML >= 3.0.0 dependency silently tolerating the significant Eclipse UML2 changes for UML 2.5 support in UML 5.0.0 in 2014. In particular the initializations for the UML 2.5 URIs is missing.

It is therefore unlikely that KDM-to-UML has worked since 2014.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 04:42

(In reply to Ed Willink from comment #2)

Unfortunately again, the bug 315355 fix and its regression test predate the start of GIT whose history was seemingly not primed from its CVS predecessor. It is therefore unclear what fixes were provided by Bug 318638#c2

Correction Bug 318638; the trivial fix is in GIT:

commit 88d79f619c2e8f09dd4ca7ade6c47b0b447ea0b9\ Author: Hugo Bruneliere hugo.bruneliere@inria.fr 2012-11-09 14:11:29\ Committer: Hugo Bruneliere hugo.bruneliere@inria.fr 2012-11-09 14:11:29\ Parent: db79cf7dcb9e076c6e0f67e657eda34886e40eca (Bug 386235 - [Releng] Use tycho to build MoDisco Fixing of checkstyle configurations.)\ Child: b0c8f53c2f85beb6cd50656f956f6b8c39f9879f (Switch to the version 0.10.2)\ Branches: master, origin/bug453476, origin/bug464300, origin/bug468838, origin/emffacetreleng-auto-pom, origin/maintenance-0.12, origin/maintenance-0.13, origin/maintenance-1.0, origin/maintenance-1.1, origin/master, origin/rmDeprecated

Applying simple patch from Bug 376144

diff --git a/org.eclipse.modisco.kdm.uml2converter/src/org/eclipse/modisco/kdm/uml2converter/internal/KdmToUmlConverter.java b/org.eclipse.modisco.kdm.uml2converter/src/org/eclipse/modisco/kdm/uml2converter/internal/KdmToUmlConverter.java\ index b1b4c4e..917ff71 100644\ --- a/org.eclipse.modisco.kdm.uml2converter/src/org/eclipse/modisco/kdm/uml2converter/internal/KdmToUmlConverter.java\ +++ b/org.eclipse.modisco.kdm.uml2converter/src/org/eclipse/modisco/kdm/uml2converter/internal/KdmToUmlConverter.java\ @@ -61,7 +61,8 @@\ public static final String MM_LOCATION = "resources/metamodels"; //$NON-NLS-1$\ public static final String TRANSFO_LOCATION = "resources/transformations"; //$NON-NLS-1$\ public static final String KDM_MM_URI = org.eclipse.gmt.modisco.omg.kdm.action.ActionPackage.eNS_URI;\

Replacing a prehistoric http://www.eclipse.org/uml2/2.1.0/UML is a good idea but replacing it by a vague platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore is absolutely not the thing to do.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 06:17

(In reply to Ed Willink from comment #3)

Caused by: java.lang.IllegalArgumentException: The feature 'Model' is not a valid feature

Atually the problem seems to be the longstanding off-by-one URI resolution that has intermittently plagued Acceleo and other tools.

The problem is a failure to resolve "#/2/WModel" in bundleresource://656.fwk2131772703/org/eclipse/modisco/kdm/uml2converter/internal/resources/metamodels/mmw_traceability.ecore

when resolved from an EPackage loaded is a DynamicEObjectImpl. Therefater either

ResourceImpl.getEObject fails to apply a prefix charracter or the final no dotIndex test in BasicEObjectImpl.eObjectForURIFragmentSegment should not strip a first character. Presumably an @ was expected as a feature prefix.

This appears to be a bug in referencing id-segments in a DynamicEObjectImpl; most obviously a multi-package *.ecore.

But why is a *.ecore loaded as a DynamicEObjectImpl at all?

Because the EPackageRegistry maps http://www.eclipse.org/emf/2002/Ecore to an EFactory rather than the EcoreFactory. --- stupid

(In reply to Ed Willink from comment #4)

Replacing a prehistoric http://www.eclipse.org/uml2/2.1.0/UML is a good idea but replacing it by a vague platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore is absolutely not the thing to do.

Indeed really stupid, since it provokes the off-by-one URI resolution bug.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 07:51

(In reply to Ed Willink from comment #5)

Indeed really stupid, since it provokes the off-by-one URI resolution bug.

The inadequate diagnosis is raised as Bug 559060.


Back to this bug. Two problems:

a) Use of EMF Compare during testing needs to be eliminated.\ b) UML needs to be initialized sensibly.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 10:12

(In reply to Ed Willink from comment #4)

Replacing a prehistoric http://www.eclipse.org/uml2/2.1.0/UML is a good idea but replacing it by a vague platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore is absolutely not the thing to do.

Effectively reverting the fix and instead replacing the explcitly vintage http://www.eclipse.org/uml2/2.1.0/UML by the dynamically current UMLPackageImpl.eNS_URI ...

(In reply to Ed Willink from comment #3)

Un-@Ignore-ing the test in the hope of a EMF Compare API violation failure...

Yes we hit the need rewrite UnsupportedOperationException.

Adding EmfFormatter to compare and there appear to be

The extras appear to be VisibilityKind visibility 'public' so this may just be a variation in default value serilaization.

Clearly the TX is now substantially working. A bit surprising since no explicit UML init added. Maybe ATL does it for us. More likely since it is a plugin test, the init comes from UML registrations. Only a standalone variant would need proper init.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 11:00

(In reply to Ed Willink from comment #7)

The extras appear to be VisibilityKind visibility 'public' so this may just be a variation in default value serilaization.

https://wiki.eclipse.org/MDT/UML2/UML2_5.0_Migration_Guide shows that UML 2.5 changed the lowerbound to 0.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 11:23

(In reply to Ed Willink from comment #2)

Unfortunately in org.eclipse.modisco.kdm.uml2converter.tests.KdmToUml2WithTracesConverterTest

@Test @Ignore // @Ignore : FIXME TestModelUtils#compareModels must be rewritten for EMF Compare 2.0 public void testKdmToUmlConverter_bug318638() throws Exception {

it appears that the regression test was disabled when the EMF Compare API changed and still awaits a rewrite.

(The same EMF Compare API instability probleme was avoided by OCL/QVTd by leveraging org.eclipse.xtext.util.EmfFormatter within org.eclipse.ocl.examples.xtext.tests.TestUtil.assertSameModel.)

This is Bug 468674.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 13:27

Bug 469150 has been marked as a duplicate of this bug.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 11, 2020 16:18

Pushed to master for 1.5.1M1.

MoDisco JIPP is down; hopefully build will worok once it's back.

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 13, 2020 04:07

So now, If I reinstall modisco plugin, it should work? I tried building from source and installing but I havent managed to do so.

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 13, 2020 04:45

It doesnt seem to work even after reinstalling from http://download.eclipse.org/releases/luna/. And I cant figure out where to get 1.5.0 from.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 13, 2020 05:45

(In reply to Ed Willink from comment #11)

MoDisco JIPP is down; hopefully build will worok once it's back.

Unfortunately, Bug 559065, the Jenkins build server is still down, so no 1.5.1 build is available.

1.5.0 is available from https://www.eclipse.org/MoDisco/downloads/ or the 2019-12 SimRel P2 repo.

However if you followed the bug investigation, it appears that this bug has been present for perhaps seven years. To get working functionality you would need to install a consistent suite of Eclipse UML2 3.x and friends.

The Jenkins build server should be back soon, now that the weekend is over. If not I will post my local build on DropBox.

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 13, 2020 06:22

Thanks a lot, Ed. I will wait until the Jenkins server is up, or you post your build on dropbox.

eclipse-modisco-bot commented 3 days ago

Jan 13, 2020 07:13

New Gerrit change created: https://git.eclipse.org/r/155735

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 13, 2020 08:18

The server is up gain. But four tests fail with trivial releng issues (e.g. Bug 559109).

A build is therefore available now at https://ci.eclipse.org/modisco/job/modisco-master/49/artifact/org.eclipse.modisco.updatesite/target/org.eclipse.modisco-1.5.1.N20200113-1125.zip (...50/... shortly)

The proper M1 build should be available in an hour or two.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 13, 2020 10:12

Bug 423935 has been marked as a duplicate of this bug.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 13, 2020 10:18

(In reply to Ed Willink from comment #17)

The server is up gain. But four tests fail with trivial releng issues (e.g. Bug 559109).

Never that trivial. Some new UML tests got enabled revealing that the MoDisco UML2 support is seriously suspect. See Bug 559115.

Anyway for the purposes of this bug the three tests can just be disabled so that KDMtoUML is perhaps viable. It is anything involving a UML copy that is broken.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 13, 2020 10:59

Finally a proper 1.5.1 N-build is available from:

http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/modisco/downloads/drops/1.5.1/N202001131531/modisco-Update-N202001131531.zip

1.5.1M1 on Wednesday.

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 14, 2020 15:47

I get a different exception now [with both zip files]\ eclipse.buildId=4.14.0.I20191210-0610\ java.version=1.8.0_231\ java.vendor=Oracle Corporation\ BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US\ Framework arguments: -product org.eclipse.epp.package.jee.product\ Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

org.eclipse.modisco.kdm.uml2converter\ Error\ Wed Jan 15 02:14:42 IST 2020\ Cannot set feature uml!Model.packagedElement to value org.eclipse.uml2.uml.internal.impl.PropertyImpl@75b2548b (name: , visibility: ) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (aggregation: none, isDerived: false, isDerivedUnion: false, isID: false) (org.eclipse.modisco.kdm.uml2converter_1.5.1.v20200113-1531)

org.eclipse.m2m.atl.engine.vm.VMException: Cannot set feature uml!Model.packagedElement to value org.eclipse.uml2.uml.internal.impl.PropertyImpl@75b2548b (name: , visibility: ) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (aggregation: none, isDerived: false, isDerivedUnion: false, isID: false)\ at A.__applyCodeModelToModel(1 : NTransientLink;) : ??#14(KDMtoUML.atl[405:3-405:37])\ local variables = {self=KDMtoUML : ASMModule, link=TransientLink {rule = 'CodeModelToModel', sourceElements = {src = kdmInput!externals}, targetElements = {tgt = umlOutput!}, variables = {}}, src=kdmInput!externals, tgt=umlOutput!}\ local stack = [umlOutput!]\ Java Stack:\ org.eclipse.m2m.atl.engine.vm.VMException: Cannot set feature uml!Model.packagedElement to value org.eclipse.uml2.uml.internal.impl.PropertyImpl@75b2548b (name: , visibility: ) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (aggregation: none, isDerived: false, isDerivedUnion: false, isID: false)\ at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(ASMEMFModelElement.java:491)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:323)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)\ at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)\ at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:357)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)\ at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)\ at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)\ at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)\ at org.eclipse.m2m.atl.engine.vm.ASMInterpreter.(ASMInterpreter.java:346)\ at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:216)\ at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:127)\ at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:92)\ at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.runTransformation(AtlLaunchHelper.java:194)\ at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.runTransformation(AtlLaunchHelper.java:173)\ at org.eclipse.modisco.kdm.uml2converter.internal.KdmToUmlConverter.getUML2ModelFromKDMModelWithCustomTransformation(KdmToUmlConverter.java:115)\ at org.eclipse.modisco.kdm.uml2converter.internal.KdmToUmlConverter.getUML2ModelFromKDMModel(KdmToUmlConverter.java:80)\ at org.eclipse.modisco.kdm.uml2converter.DiscoverUmlModelFromKdmModel.basicDiscoverElement(DiscoverUmlModelFromKdmModel.java:89)\ at org.eclipse.modisco.kdm.uml2converter.DiscoverUmlModelFromKdmModel.basicDiscoverElement(DiscoverUmlModelFromKdmModel.java:1)\ at org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer.discoverElement(AbstractDiscoverer.java:93)\ at org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer.discoverElement(AbstractModelDiscoverer.java:184)\ at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener.discovererElement(MoDiscoMenuSelectionListener.java:229)\ at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener$1.run(MoDiscoMenuSelectionListener.java:168)\ at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)\ Caused by: java.lang.ArrayStoreException: org.eclipse.uml2.uml.internal.impl.PropertyImpl\ at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:118)\ at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:417)\ at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUnique(NotifyingListImpl.java:325)\ at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:282)\ at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:304)\ at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(ASMEMFModelElement.java:488) ... 26 more

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 15, 2020 01:20

See Bug 559115. MoDisco has failed to track the Eclipse UML2 migration to support UML 2.5, consequently the ATL transformations have some assignments to non-changeable features causing this crash.

Since the UML2 aspects of MoDisco have clearly not been working for many years, I am seriously considering removing them totally until some enthusiast is available to repair them.

Sorry. MoDisco is on life support. This gangrenous limb may need amputation.

eclipse-modisco-bot commented 3 days ago

By Fabien Giquel on Jan 15, 2020 03:40

Hi Sagar,

(In reply to Sagar Kapadia from comment #21)

I get a different exception now [with both zip files]

could you please attach to this bugzilla some minimal resources for reproducing the issue:

Regards,

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 16, 2020 02:09

Created attachment 281513 The xmi file which causes the issue

I have attached the xmi file.

:notepad_spiral: briskheat-bhx-service_kdm.xmi

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 20, 2020 01:07

(In reply to Fabien Giquel from comment #23)

Hi Sagar,

(In reply to Sagar Kapadia from comment #21)

I get a different exception now [with both zip files]

could you please attach to this bugzilla some minimal resources for reproducing the issue:

  • origin java code which was transformed to kdm
  • OR the intermediate obtained kdm xmi file, for which the transfo kdm->uml crashes

Regards,

Hi Fabien,\ I attached a xmi file to the reply some days ago. Do I need to do anything more? \ Thanks,\ Sagar

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 20, 2020 04:05

(In reply to Sagar Kapadia from comment #25)

I attached a xmi file to the reply some days ago. Do I need to do anything more?

Sorry. In this case, a repro wasn't needed; particularly not the 96MB that hangs Firefox.

Your later stack trace has the magic clue "Cannot set feature uml!Model.packagedElement to value" and searching *.atl for "packagedElement" reveals at least 9 assignments in KDMtoUML.atl. packagedElement changed to a not-changeable derived feature for UML 2.5. Overall the ptoject has nearly 50 "packagedElement" assignments that need reconsideration.

As commented in Bug 559115, providing a mindless upgrade of the *.atl code for UML2 5.x would not be responsible. Therefore, in the absence of community support and provided the appropriate amputation threshold between UML and generic functionality can be located, UML support will be amputated.

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 20, 2020 08:01

Does that mean that MoDisco cannot be used to convert from xmi to uml anymore?

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 20, 2020 09:18

(In reply to Sagar Kapadia from comment #27)

Does that mean that MoDisco cannot be used to convert from xmi to uml anymore?

No (yes). MoDisco UML2 functionality went away in 2012. It is only the deception that MoDisco can be used for XMI to UML that is to be removed.

Unless you can show that this worked much more recently (with MoDisco 1.0 or greater) making it work is way out of scope for life-support.

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 22, 2020 01:12

Noted. Are there any alternatives to convert an xmi file to uml?

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 22, 2020 01:29

Not that I know of.

You keep referring to XMI2UML which is wrong. UML is also XMI so by your terminology your problem is solved without any transformation at all.

You 'just' need an ordinary KDM to UML tx. MoDisco provides one in ATL. It shouldn't be that hard to migrate to UML 2.5.

If you plan to fix it, please notify this list so that amputation can be deferred awaiting your fix.

eclipse-modisco-bot commented 3 days ago

By Sagar Kapadia on Jan 22, 2020 06:53

Sorry Ed, \ I think its beyond my capabilities to fix this. \ I am not completely sure I understand what you mean. Can I open the xmi in papyrus or something else to generate diagrams, or is another step needed?\ Thanks,\ Sagar

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 22, 2020 07:10

XMI is a particular serialization. It may have be used for many different models conforming to many different metamodels.

Similarly a book is a rendering of textual content, but if you buy a French rather than an English copy of The Three Musketeers you may be disappointed. There is nothing wrong with the book, it is a copy of Les Trois Mousquetaires.

For Papyrus you must provide an XMI serialization of a UML conformant model (cf. English) of interest. You have an KDM conformant model (cf. French) of interest; Papyrus doesn't speak KDM so you use a KDMtoUML transformation (cf French to Emglish) to make it acceptable to Papyrus.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Feb 04, 2020 01:41

(In reply to Ed Willink from comment #30)

You 'just' need an ordinary KDM to UML tx. MoDisco provides one in ATL. It shouldn't be that hard to migrate to UML 2.5.

Debugging this has been confused by:

Bug 559115, all MoDisco UML functionality has been broken, probably since 2012.

Bug 559506, the KDM2UML2.atl transformation has never been tested on realistic models; it has many bugs.