Skip to main content



      Home
Home » Polarsys » M2Doc » M2Doc technical error : Index 0, Size 0
M2Doc technical error : Index 0, Size 0 [message #1823458] Thu, 26 March 2020 17:16 Go to next message
Eclipse UserFriend
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 17:21] by Moderator

Re: M2Doc technical error : Index 0, Size 0 [message #1823460 is a reply to message #1823458] Thu, 26 March 2020 17:21 Go to previous messageGo to next message
Eclipse UserFriend
Hi Fabio,
Not a solution but could you also provide the error log file ?
Stephane
Re: M2Doc technical error : Index 0, Size 0 [message #1823465 is a reply to message #1823460] Thu, 26 March 2020 19:59 Go to previous messageGo to next message
Eclipse UserFriend
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 128 times)
Re: M2Doc technical error : Index 0, Size 0 [message #1823466 is a reply to message #1823465] Thu, 26 March 2020 20:25 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: M2Doc technical error : Index 0, Size 0 [message #1823468 is a reply to message #1823466] Thu, 26 March 2020 21:03 Go to previous messageGo to next message
Eclipse UserFriend
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 04:07 Go to previous messageGo to next message
Eclipse UserFriend
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 16:49 Go to previous messageGo to next message
Eclipse UserFriend
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 16:52] by Moderator

Re: M2Doc technical error : Index 0, Size 0 [message #1823603 is a reply to message #1823510] Mon, 30 March 2020 03:14 Go to previous message
Eclipse UserFriend
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: Sat Jul 12 18:15:18 EDT 2025

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

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

Back to the top