Code Generation - Unresolved Reference in GenerateJava.emtl [message #1807657] |
Wed, 05 June 2019 17:28 |
Sven Peldszus 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 #1807705 is a reply to message #1807700] |
Thu, 06 June 2019 13:31 |
Sven Peldszus 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03332 seconds