Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Code Generation - Unresolved Reference in GenerateJava.emtl
Code Generation - Unresolved Reference in GenerateJava.emtl [message #1807657] Wed, 05 June 2019 17:28 Go to next message
Sven Peldszus is currently offline Sven PeldszusFriend
Messages: 7
Registered: February 2017
Junior Member
Hello everyone,

currently there are quite a lot of topic regarding problems with the MoDisco Code generation and I've also one.

My problem seems to be related to the one described in the following thread: https://www.eclipse.org/forums/index.php/t/274933/

However, as already someone else added a new problem to this thread, which doesn't seem to be related to the problem I have, I decided to open a new topic.


I am currently trying to generate Java source code from a MoDisco model and I am pretty sure it worked one or two years ago. But now I get an Exception when Accelo is initialized:

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '/0/write.5'. (jar:file:[..]/eclipse/plugins/org.eclipse.gmt.modisco.java.generation_1.2.0.201805182005.jar!/org/eclipse/gmt/modisco/java/generation/files/GenerateJava.emtl, 69, 75)
	at 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.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:415)
	at org.eclipse.gmt.modisco.java.generation.files.GenerateJava.<init>(GenerateJava.java:113)
	at org.eclipse.gmt.modisco.java.generation.files.GenerateJavaExtended.<init>(GenerateJavaExtended.java:44)
	at org.gravity.tgg.uml.Transformation.umlToProject(Transformation.java:287)
...


I am working on an Eclipse 2019-03 and I am executing the code generation in a plug-in context using the following code:

GenerateJavaExtended generateJavaExtended = new GenerateJavaExtended(model, outFile.getLocation().toFile(), Collections.emptyList());
generateJavaExtended.doGenerate(new BasicMonitor.EclipseSubProgress(monitor, 1));


For me it looks like the "GenerateJava.emtl" file provided by the "org.eclipse.gmt.modisco.java.generation" plugin is broken, but I am wondering because no one else seems to have this issue.

Thanks for your help.

Sven
Re: Code Generation - Unresolved Reference in GenerateJava.emtl [message #1807700 is a reply to message #1807657] Thu, 06 June 2019 11:52 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

Have you also investigated the Acceleo forum to identify where the problem could come from?
Maybe there has been some changes in the Acceleo APIs that now make this MTL file not working...


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Code Generation - Unresolved Reference in GenerateJava.emtl [message #1807705 is a reply to message #1807700] Thu, 06 June 2019 13:31 Go to previous messageGo to next message
Sven Peldszus is currently offline Sven PeldszusFriend
Messages: 7
Registered: February 2017
Junior Member
Thanks for the quick response.

As I was assuming this is a problem only I have and is therefore is caused by a problem at my side, I haven't asked there yet.

However, as the MTL file has been changed 7 years ago the last time, a change in the Acceleo APIs could really be a reason.
Which version does your Acceleo have and is the code generation working for you?
Mine is at 3.7.8. I'll try to install an older version to figure out if this is the reason.

Edit: I also tried version 3.7.5 and get the same problem

[Updated on: Thu, 06 June 2019 14:58]

Report message to a moderator

Re: Code Generation - Unresolved Reference in GenerateJava.emtl [message #1808329 is a reply to message #1807705] Fri, 21 June 2019 14:36 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
I don't remember exactly which Acceleo version it was, but for sure it was more recenly than 7 years ago.

Kind regards
Previous Topic:Metamodelo KDM
Next Topic:Cast Errors in a Custom Metamodel
Goto Forum:
  


Current Time: Sat May 11 01:24:40 GMT 2024

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

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

Back to the top