Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » Error when generate doc(No file has been generated after template execution)
Error when generate doc [message #1746303] Wed, 26 October 2016 15:45 Go to next message
David Garcia is currently offline David GarciaFriend
Messages: 16
Registered: July 2016
Junior Member
Hello,

I am trying generate a doc from a xmi model. This xmi comes from an ecore metamodel. I have created a simple sample but it doesn't work. When I generate I obtain the error: "The execution of a script failed: Error during generation of Gendoc script :No file has been generated after template execution"

My document generator (test.docx) contains:

<config>
<output path='D:/testgendoc/generatedDoc.docx'/>
</config>

<context model='D:/testgendoc/System.xmi'/>

<gendoc>
[self.name/]
</gendoc>


I have following steps in Gendoc_v0.5_tutorial and I have installed the last releases available (GenDoc 0.6.0)

I think the model is correctly load because for instance if I modify the script and put [self.nameWrong/] , it detects an error of coherence "The execution of a script failed: Error during generation of Gendoc script :Unrecognized variable: (nameWrong)"

When I generate I obtain the output 'generatedDoc.docx' but its contents is:

--- ERROR DURING GENERATION OF THIS PART Error message: Error during generation of Gendoc script :No file has been generated after template execution. --- <gendoc>
[self.name/]
</gendoc> --- END ERROR ---gendoc>


Any idea?

Regards,

[Updated on: Wed, 26 October 2016 16:23]

Report message to a moderator

Re: Error when generate doc [message #1746306 is a reply to message #1746303] Wed, 26 October 2016 16:14 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
hello
indeed it is strange can you copy more information from the log or attache the log content ?




Re: Error when generate doc [message #1746307 is a reply to message #1746306] Wed, 26 October 2016 16:22 Go to previous messageGo to next message
David Garcia is currently offline David GarciaFriend
Messages: 16
Registered: July 2016
Junior Member
log info doesn't contribute nothing, look:

!ENTRY org.eclipse.gendoc.services 4 4 2016-10-26 17:22:58.368
!MESSAGE The execution of a script failed: Error during generation of Gendoc script :No file has been generated after template execution.

!ENTRY org.eclipse.gendoc.services 4 4 2016-10-26 17:25:38.025
!MESSAGE The execution of a script failed: Error during generation of Gendoc script :No file has been generated after template execution.

!ENTRY org.eclipse.gendoc.services 4 4 2016-10-26 17:33:29.844
!MESSAGE The execution of a script failed: Error during generation of Gendoc script :No file has been generated after template execution.

!ENTRY org.eclipse.gendoc.services 4 4 2016-10-26 17:41:07.608
!MESSAGE The execution of a script failed: Error during generation of Gendoc script :Unrecognized variable: (nameWrong)

!ENTRY org.eclipse.gendoc.services 4 4 2016-10-26 17:55:36.002
!MESSAGE The execution of a script failed: Error during generation of Gendoc script :No file has been generated after template execution.
Re: Error when generate doc [message #1746308 is a reply to message #1746307] Wed, 26 October 2016 16:23 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
do you have content in the attribute nombre ?



Re: Error when generate doc [message #1746309 is a reply to message #1746308] Wed, 26 October 2016 16:32 Go to previous messageGo to next message
David Garcia is currently offline David GarciaFriend
Messages: 16
Registered: July 2016
Junior Member
Yes it has value, in fact, If I remove [self.name/] (or nombre)

<gendoc>
</gendoc>

That is <gendoc> block is empty it generates the same error.
Re: Error when generate doc [message #1746331 is a reply to message #1746309] Thu, 27 October 2016 06:56 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
even we can not generate because we don't have metamodels can you attach a template and a result ?



Re: Error when generate doc [message #1754870 is a reply to message #1746331] Thu, 23 February 2017 11:03 Go to previous messageGo to next message
David Garcia is currently offline David GarciaFriend
Messages: 16
Registered: July 2016
Junior Member
It works fine. I had tags bad constructed. I have based on recent sample "https://wiki.eclipse.org/Gendoc/samples/genericTemplateEcore.

Looking for in forum I have seen exist an acceleo interpreter (https://www.eclipse.org/forums/index.php/t/1082571/) to validate queries. It can facilitate template's build a lot because is difficult make the template directly in a .docx.

I would like know if interpreter is able to give information about a model. That it to say interpreter provides entities of this model by means of contextual menu. If not is possible there are other alternatives?

Thanks
Re: Error when generate doc [message #1754884 is a reply to message #1754870] Thu, 23 February 2017 13:59 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
Hello, I don't think the Interpreter is able to give that information from model.

Generally when I want to get metamodel information I create an ecore file (file >new > Eclipse Modeling Framework > Ecore Model)
Once the model is created I do right click > Load resource > Browse Registered Packages .... and I select the ecore i want to analyze. This ecore is displayed at the root of the tree editor




Re: Error when generate doc [message #1755109 is a reply to message #1754884] Tue, 28 February 2017 08:37 Go to previous messageGo to next message
Antonio Campesino is currently offline Antonio CampesinoFriend
Messages: 38
Registered: August 2016
Member
Hi David,

I normally used the acceleo Interpreter for defining the queries in the templates. If you browse your model and selected the element in the model, the interpreter editor provides contextual information and autocomplete functionality.

I think is find the EMF package through the EObject instance selected in the EMF editor. It may not be what you are looking after but it quite handy.
Re: Error when generate doc [message #1756045 is a reply to message #1755109] Fri, 10 March 2017 11:17 Go to previous messageGo to next message
David Garcia is currently offline David GarciaFriend
Messages: 16
Registered: July 2016
Junior Member
Thank you the contributions. I use the acceleo Interpreter for defining the queries in the templates too.

On the other hand, I have detected GenDoc is unstable because if I modify my script (it is correct) I obtain the error message "The execution of a script failed: Error during generation of Gendoc script :No file has been generated after template execution", but curiously if I reset eclipse and execute the generation documentation works fine.

My framework configuration is an eclipse Neon.1a Release (4.6.1) package Eclipse Modeling Framework with Acceleo 3.6.5, Xpand 2.2.0, MWE 1.3.20,
Re: Error when generate doc [message #1756052 is a reply to message #1756045] Fri, 10 March 2017 12:04 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
Very strange it is maybe because of the use of dynamic models. It is the case for you isn't it ?

Can you describe a reproducible bug into a bugzilla bug ?




Re: Error when generate doc [message #1756055 is a reply to message #1756052] Fri, 10 March 2017 12:09 Go to previous message
David Garcia is currently offline David GarciaFriend
Messages: 16
Registered: July 2016
Junior Member
My models are static
Previous Topic:gendoc - instance model
Next Topic:Your functional needs
Goto Forum:
  


Current Time: Thu Sep 20 15:09:59 GMT 2018

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

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

Back to the top