Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Problems migrating a project from Acceleo 3.7.3/Java 9.0.4 to Acceleo 3.7.8/Java 11.0.2(Problems building the project's code when trying different ways to migrate the source code from one version to another)
[Acceleo] Problems migrating a project from Acceleo 3.7.3/Java 9.0.4 to Acceleo 3.7.8/Java 11.0.2 [message #1804736] Sat, 30 March 2019 19:36 Go to next message
Tomas Balderas is currently offline Tomas BalderasFriend
Messages: 64
Registered: July 2010
Member
Hello experts

I hope you can help me. I want to migrate an existing Acceleo project developed using Eclipse Photon/Acceleo 3.7.3/Java 9.0.4 to a different environment, Eclipse 2019-03/Acceleo 3.7.8/Java SDK 11.0.2. I tried the following:

1. I imported the existing Acceleo 3.7.3 project into the new environment's workspace using Import ... -> General -> Existing Projects Into Workspace. The creation of the project's files into the target workspace was successful, but I had different building problems in the Error Log console.

2. I created a new project in Eclipse 2019-03/Acceleo 3.7.8 and copied the contents of the only .mtl file in the Eclipse Photon/Acceleo 3.7.3 project into the corresponding .mtl file in the new project. This time, I got the following building errors:

MESSAGE: Errors running builder 'Acceleo Builder' on project 'org.eclipse.acceleo.module.firstSwiftGen'.

EXCEPTION STACK TRACE:
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '/0/name.1'. (platform:/resource/org.eclipse.acceleo.module.firstSwiftGen/bin/org/eclipse/acceleo/module/firstSwiftGen/main/swiftGen.emtl, 310, 72)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
	at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:391)
	at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:356)
	at org.eclipse.acceleo.internal.ide.ui.builders.runner.CreateRunnableAcceleoOperation.run(CreateRunnableAcceleoOperation.java:129)
	at org.eclipse.acceleo.internal.ide.ui.builders.AcceleoBuilder.build(AcceleoBuilder.java:213)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:833)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '/0/name.1'. (platform:/resource/org.eclipse.acceleo.module.firstSwiftGen/bin/org/eclipse/acceleo/module/firstSwiftGen/main/swiftGen.emtl, 310, 72)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1197)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1282)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:746)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:539)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
	at org.eclipse.acceleo.model.mtl.resource.EMtlResourceImpl.doLoad(EMtlResourceImpl.java:93)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	... 17 more


and

MESSAGE: Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".

EXCEPTION STACK TRACE:
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '/0/name.1'. (platform:/resource/org.eclipse.acceleo.module.firstSwiftGen/bin/org/eclipse/acceleo/module/firstSwiftGen/main/swiftGen.emtl, 310, 72)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
	at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:391)
	at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:356)
	at org.eclipse.acceleo.internal.ide.ui.builders.runner.CreateRunnableAcceleoOperation.run(CreateRunnableAcceleoOperation.java:129)
	at org.eclipse.acceleo.internal.ide.ui.builders.AcceleoBuilder.build(AcceleoBuilder.java:213)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:833)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '/0/name.1'. (platform:/resource/org.eclipse.acceleo.module.firstSwiftGen/bin/org/eclipse/acceleo/module/firstSwiftGen/main/swiftGen.emtl, 310, 72)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1197)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1282)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:746)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:539)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
	at org.eclipse.acceleo.model.mtl.resource.EMtlResourceImpl.doLoad(EMtlResourceImpl.java:93)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	... 17 more


Does any of you know what I am doing wrong? Thank you very much in advance.


/TB
Re: [Acceleo] Problems migrating a project from Acceleo 3.7.3/Java 9.0.4 to Acceleo 3.7.8/Java 11.0. [message #1804739 is a reply to message #1804736] Sat, 30 March 2019 20:53 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6372
Registered: July 2009
Senior Member
Hi

This looks suspiciously like https://bugs.eclipse.org/bugs/show_bug.cgi?id=543026 which made Acceleo 3.7.7 unusable. But 3.7.8 should have the fix.

However since you provide minimal details, that is all the help I can offer.

Regards

Ed Willink
Re: [Acceleo] Problems migrating a project from Acceleo 3.7.3/Java 9.0.4 to Acceleo 3.7.8/Java 11.0. [message #1804742 is a reply to message #1804739] Sat, 30 March 2019 21:37 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6372
Registered: July 2009
Senior Member
Hi

The repro for the 3.7.7 bug on https://www.eclipse.org/forums/index.php/mv/msg/1097311/1801932/#msg_1801932 fails on 3.7.8 too!

EMF for 2019-03 has a subtle change in exactly the area that broke 3.7.7, but the change looks good. However today, I would recommend (2018-09 and) EMF 2.15 to use Acceleo.

Regards

Ed Willink
Re: [Acceleo] Problems migrating a project from Acceleo 3.7.3/Java 9.0.4 to Acceleo 3.7.8/Java 11.0. [message #1804743 is a reply to message #1804742] Sat, 30 March 2019 22:09 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6372
Registered: July 2009
Senior Member
Hi

https://bugs.eclipse.org/bugs/show_bug.cgi?id=545963 raised.

Regards

Ed Willink
Re: [Acceleo] Problems migrating a project from Acceleo 3.7.3/Java 9.0.4 to Acceleo 3.7.8/Java 11.0. [message #1804750 is a reply to message #1804743] Sun, 31 March 2019 11:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6372
Registered: July 2009
Senior Member
Hi

The actual bug is present in all versions of Acceleo but only Acceleo 3.7.7 and 3.7.8 are sensibly affected by concurrent versions of EMF. The EMF 2.16 change broke 3.7.7 fatally; any save failed. 3.7.8 is more subtle; only saves of overloads fail.)

Solution: Install the early EMF 2.18 fix from https://ci.eclipse.org/emf/job/gerrit/75/artifact/updates

(The above should remain available for about a week. Thereafter hopefully the fix will be in a latest nightly build available from https://download.eclipse.org/modeling/emf/emf/builds/index.html .)

Long term:

Acceleo <=3.7.7 is broken on EMF >= 2.16 (2018-12)
Acceleo 3.7.8 is broken on EMF 2.16 and EMF 2.17 (2018-12 and 2019-03).
Acceleo 3.7.8 is fixed by an early EMF 2.18 (2019-06).

Regards

Ed Willink
Re: [Acceleo] Problems migrating a project from Acceleo 3.7.3/Java 9.0.4 to Acceleo 3.7.8/Java 11.0. [message #1806492 is a reply to message #1804750] Thu, 09 May 2019 19:46 Go to previous messageGo to next message
Jad El-khoury is currently offline Jad El-khouryFriend
Messages: 37
Registered: August 2015
Member
I am facing a similar error message, once I migrated from Oxygen and Acceleo 3.7.2 to Eclipse2019-03 & Acceleo 3.7.8.
I normally don't need to install EMF. Do I need to explictly install the EMF plugins now (with the specific versions specified above)?

For what it's worth, I found that the error occurs on Acceleo queries that have the same name (but a different signature). Change the names of the queries avoided the error. But this is not a solution, since it requires a lot of code changes.
Re: [Acceleo] Problems migrating a project from Acceleo 3.7.3/Java 9.0.4 to Acceleo 3.7.8/Java 11.0. [message #1806509 is a reply to message #1806492] Fri, 10 May 2019 05:10 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6372
Registered: July 2009
Senior Member
HI

Yes. Use the latest EMF Milestone build from https://download.eclipse.org/modeling/emf/emf/builds/index.html until you can migrate to Eclipse 2019-06 (not available till late June).

Regards

Ed Willink
Previous Topic:[Acceleo] Disambiguate class reference
Next Topic:M2T Ecore2XML / Ecore2JSON Tutorial/Guide/Help
Goto Forum:
  


Current Time: Mon May 27 07:28:42 GMT 2019

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

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

Back to the top