Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Polarsys » M2Doc » M2Doc technical error : Index 0, Size 0
M2Doc technical error : Index 0, Size 0 [message #1823458] Thu, 26 March 2020 21:16 Go to next message
Fábio Guarita is currently offline Fábio GuaritaFriend
Messages: 64
Registered: December 2019
Member
Hi,

whenever I command a document generation by clicking on "Generate Documentation" I get the error message below with the details also pictured below.

index.php/fa/37672/0/

This happened before but the problem went away without any special action from me. This time the problem persits although I have closed everything, restarted the computer and deleted the old generated docx.

Do you guys have any clue what might be happening?

I'm using M2Doc v2.0.3 with Capella v1.3.1 and PVMT v44.4.2

Edit: I don't know if it is related but in the folder where my template is stored a debug.log file was created about the time M2Doc started returning errors.

The content of debug.log is:
[0326/174655.395:ERROR:registration_protocol_win.cc(84)] TransactNamedPipe: The pipe has been ended. (0x6D)

[Updated on: Thu, 26 March 2020 21:21]

Report message to a moderator

Re: M2Doc technical error : Index 0, Size 0 [message #1823460 is a reply to message #1823458] Thu, 26 March 2020 21:21 Go to previous messageGo to next message
Stephane LACRAMPE is currently offline Stephane LACRAMPEFriend
Messages: 217
Registered: July 2009
Senior Member
Hi Fabio,
Not a solution but could you also provide the error log file ?
Stephane


Stephane LACRAMPE
Obeo Canada
Re: M2Doc technical error : Index 0, Size 0 [message #1823465 is a reply to message #1823460] Thu, 26 March 2020 23:59 Go to previous messageGo to next message
Fábio Guarita is currently offline Fábio GuaritaFriend
Messages: 64
Registered: December 2019
Member
Hi Stephane!

I searched for the error log and all I could find in my workspace that seemed like an error log was in the .metadata folder in the workspace root with the name '.log'.

I've attached it to thist post.

It seems the log regarding the errors on M2Doc generation is in the following lines:


!ENTRY org.obeonetwork.m2doc.genconf.editor 4 4 2020-03-26 20:34:00.900
!MESSAGE M2Doc : technical error : Index: 0, Size: 0
!STACK 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at java.util.Collections$UnmodifiableList.get(Unknown Source)
at org.obeonetwork.m2doc.util.M2DocUtils.parseTemplateCustomProperties(M2DocUtils.java:491)
at org.obeonetwork.m2doc.util.M2DocUtils.parse(M2DocUtils.java:444)
at org.obeonetwork.m2doc.genconf.GenconfUtils.generate(GenconfUtils.java:483)
at org.obeonetwork.m2doc.genconf.GenconfUtils.generate(GenconfUtils.java:420)
at org.obeonetwork.m2doc.genconf.editor.command.GenerateHandler$GenerateJob.runInWorkspace(GenerateHandler.java:86)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)


  • Attachment: .log
    (Size: 368.54KB, Downloaded 74 times)
Re: M2Doc technical error : Index 0, Size 0 [message #1823466 is a reply to message #1823465] Fri, 27 March 2020 00:25 Go to previous messageGo to next message
Stephane LACRAMPE is currently offline Stephane LACRAMPEFriend
Messages: 217
Registered: July 2009
Senior Member
Thanks Fabio, that's the file
I pinged the m2doc team, hopefully they can provide an answer quickly.
Would you also share your m2doc template in case it is needed?
Stephane


Stephane LACRAMPE
Obeo Canada
Re: M2Doc technical error : Index 0, Size 0 [message #1823468 is a reply to message #1823466] Fri, 27 March 2020 01:03 Go to previous messageGo to next message
Fábio Guarita is currently offline Fábio GuaritaFriend
Messages: 64
Registered: December 2019
Member
Thanks for your effort Stephane! I have defaced the document maintaining only the tags used by M2Doc and the problem remains so I believe it is still representative. Find it attached below;
Re: M2Doc technical error : Index 0, Size 0 [message #1823483 is a reply to message #1823468] Fri, 27 March 2020 08:07 Go to previous messageGo to next message
Yvan Lussaud is currently offline Yvan LussaudFriend
Messages: 63
Registered: July 2009
Member
After looking at M2Doc code, it seems that one of the metamodel your are using can't be found. Your should open the template properties using the wizard and in the nsURI tab make sure all the metamodel you are using are available.

I see a lot imported metamodels, you should probably remove some of them. A good starting point is probably to keep *capella* and *sirius* and maybe *thales* also. From here see if the template works or if it complains about missing types and add metamodels accordingly.

I don't have the same environment as you so I can't tell which one exactly.
Re: M2Doc technical error : Index 0, Size 0 [message #1823510 is a reply to message #1823483] Fri, 27 March 2020 20:49 Go to previous messageGo to next message
Fábio Guarita is currently offline Fábio GuaritaFriend
Messages: 64
Registered: December 2019
Member
Thank you for the answer It works! Removing all the elements from the nsURI tab and readding the ones you mentioned made it work but now I'm getting a validation error.

The output generated seems OK but I don't know if the validation error is serious. InterfaceGen.validation.docx has these error messages in two tags:

{m:ce.source.eContainer().name <--- Feature name not found in EClass EAnnotation Feature name not found in EClass DAnalysisCustomData Feature name not found in EClass ToolGroupInstance Feature name not found in EClass AnnotationEntry Feature name not found in EClass EValue}

{m:ce.target.eContainer().name <--- Feature name not found in EClass EAnnotation Feature name not found in EClass DAnalysisCustomData Feature name not found in EClass ToolGroupInstance Feature name not found in EClass AnnotationEntry Feature name not found in EClass EValue}

[Updated on: Fri, 27 March 2020 20:52]

Report message to a moderator

Re: M2Doc technical error : Index 0, Size 0 [message #1823603 is a reply to message #1823510] Mon, 30 March 2020 07:14 Go to previous message
Yvan Lussaud is currently offline Yvan LussaudFriend
Messages: 63
Registered: July 2009
Member
At this point ce.target can be contained in an element of type EAnnotation, DAnalysisCustomData, ToolGroupInstance, EClass AnnotationEntry, EValue, or ... and those EClasses don't have a feature name meaning calling .name could cause an error at runtime.

If you know the type you expect you can specify it like this:

{m:ce.source.eContainer().oclAsType(pkg::MyEClass).name}

Of course MyEClass should have a feature name.
Previous Topic:M2Doc and PVMT extension
Next Topic:M2Doc Diagram names
Goto Forum:
  


Current Time: Thu Apr 25 12:30:51 GMT 2024

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

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

Back to the top