Problems with the Component Diagram

kalauer
2008-09-23
2013-04-22
  • kalauer
    kalauer
    2008-09-23

    Hey,

    I tried to draw some UML diagrams with metaUML and everything went fine, until I tried component diagrams. Each time I try to compile the .mp-file via the command line, using mpost, I receive an error.
    If I try to compile this file

      input metauml;
      beginfig(1);

      Component.C("C")();
      drawObject(C);

      endfig;
      end

    the logfile says:

    This is MetaPost, Version 1.005 (MiKTeX 2.7) (preloaded mem=mpost 2008.9.23)  23 SEP 2008 23:29
    **uml_cpt_spl.mp
    (uml_cpt_spl.mp (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml.mp
    (C:\Programme\MiKTeX 2.7\metapost\base\boxes.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_infrastructure.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_object.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_infrastructure.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_commons.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_margins.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_picture.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_margins.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_group.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_object.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_commons.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_margins.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_picture_stack.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_picture.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_commons.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_group.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_positioning.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_shade.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_base.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_links.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_paths.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_note.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_object.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_picture_stack.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_shade.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_margins.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_stereotype.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_class_clipart.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_class.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_picture.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_picture_stack.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_shade.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_instance.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_picture.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_picture_stack.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_shade.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_class_relations.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_class_assoc.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_package.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_package_relations.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_behavioral_common.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_activity.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_state.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_usecase_clipart.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_usecase.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp))
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_templates.mp
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\metauml_defaults.mp)
    (C:\Programme\MiKTeX 2.7\metapost\generic\metauml\util_log.mp)))
    >> Component.C
    ! Isolated expression.
    <to be read again>
                       (
    l.4 Component.C(
                    "C")();
    I couldn't find an `=' or `:=' after the
    expression that is shown above this error message,
    so I guess I'll just ignore it and carry on.

    ! Extra tokens will be flushed.
    <to be read again>
                       (
    l.4 Component.C(
                    "C")();
    I've just read as much of that statement as I could fathom,
    so a semicolon should have been next. It's very puzzling...
    but I'll try to get myself back together, by ignoring
    everything up to the next `;'. Please insert a semicolon
    now in front of anything that you don't want me to delete.
    (See Chapter 27 of The METAFONTbook for an example.)

    >> C.className
    >> "_draw"
    ! Not implemented: (unknown numeric)&(string).
    <to be read again>
                       ;
    drawObject->...odName:=(SUFFIX2)className&"_draw";
                                                      log"invoking "&methodName&...
    l.5 drawObject(C)
                     ;
    I'm afraid I don't know how to apply that operation to that
    combination of types. Continue, and I'll return the second
    argument (see above) as the result of the operation.

    >> _draw.C
    ! Isolated expression.
    <to be read again>
                       ;
    drawObject->...2);scantokens(methodName)(SUFFIX2);
                                                      endgroup
    l.5 drawObject(C)
                     ;
    I couldn't find an `=' or `:=' after the
    expression that is shown above this error message,
    so I guess I'll just ignore it and carry on.

    [1] )
    1 output file written: uml_cpt_spl.1

    If I replace "Component" by "Interface" the compiling works.

    What might be the problem?

    Thanks for help.

     
    • Hello,

      I compiled the following on my system (Fedora 7, with TexLive installed manually)

      $ mpost -v
      MetaPost 1.005 (Web2C 7.5.7)

      I compiled the file:

      input metauml;

      beginfig(1);

      Component.C("C")();
      drawObject(C);

      endfig;
      end

      with `mptopdf test.mp` and the pdf is correctly obtained. The head of the log file reads:

      This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7) (format=mptopdf 2008.8.8)  17 NOV 2008 11:00

      The command `mpost test.mp` also works. Unfortunately it seems that I cannot reproduce your issue, I will investigate further and get back to you.

       
      • kalauer
        kalauer
        2008-11-24

        Alright, somehow I had kind of a misconfiguration in my mptopdf...

        I couldn't fix it properly but now it at least starts to compile...

        I guess, I haven't installed mptopdf properly..

        That's why, it produces a whole bunch of errors:

        This is pdfTeX, Version 3.1415926-1.40.8-beta-20080627 (MiKTeX 2.7) (preloaded format=mptopdf 2008.11.24)  24 NOV 2008 21:59
        entering extended mode
        **test.mp
        (test.mp [MP to PDF]
        ! I can't find file `input'.
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.1 input
                  metauml;
        Please type another input file name:
        ("C:\Programme\MiKTeX 2.7\tex\latex\tools\.tex")
        Runaway argument?
        ! File ended while scanning use of \handleMPsequence.
        <inserted text>
                        \par
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.1 input
                  metauml;
        ?
        [warning: the width is less than 1in] [warning: the height is less than 1in]
        ! You can't use `\end' in internal vertical mode.
        \bye ->\par \vfill \supereject \end
                                           
        l.1 input
                  metauml;
        ?
        [MP to PDF]
        ! I can't find file `metauml;'.
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.1 input metauml;
                         
        Please type another input file name:
        ("C:\Programme\MiKTeX 2.7\tex\latex\tools\.tex")
        Runaway argument?
        ! File ended while scanning use of \handleMPsequence.
        <inserted text>
                        \par
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.1 input metauml;
                         
        ?
        [warning: the width is less than 1in] [warning: the height is less than 1in]
        ! You can't use `\end' in internal vertical mode.
        \bye ->\par \vfill \supereject \end
                                           
        l.1 input metauml;
                         
        ?
        [MP to PDF]
        ! I can't find file `beginfig(1);'.
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.2 beginfig(1);
                       
        Please type another input file name:
        ("C:\Programme\MiKTeX 2.7\tex\latex\tools\.tex")
        Runaway argument?
        ! File ended while scanning use of \handleMPsequence.
        <inserted text>
                        \par
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.2 beginfig(1);
                       
        ?
        [warning: the width is less than 1in] [warning: the height is less than 1in]
        ! You can't use `\end' in internal vertical mode.
        \bye ->\par \vfill \supereject \end
                                           
        l.2 beginfig(1);
                       
        ?
        [MP to PDF]
        ! I can't find file `Component.C(C)();'.
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.4 Component.C("C")();
                              
        Please type another input file name:
        ("C:\Programme\MiKTeX 2.7\tex\latex\tools\.tex")
        Runaway argument?
        ! File ended while scanning use of \handleMPsequence.
        <inserted text>
                        \par
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.4 Component.C("C")();
                              
        ?
        [warning: the width is less than 1in] [warning: the height is less than 1in]
        ! You can't use `\end' in internal vertical mode.
        \bye ->\par \vfill \supereject \end
                                           
        l.4 Component.C("C")();
                              
        ?
        [MP to PDF]
        ! I can't find file `drawObject(C);'.
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.5 drawObject(C);
                         
        Please type another input file name:
        ("C:\Programme\MiKTeX 2.7\tex\latex\tools\.tex")
        Runaway argument?
        ! File ended while scanning use of \handleMPsequence.
        <inserted text>
                        \par
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.5 drawObject(C);
                         
        ?
        [warning: the width is less than 1in] [warning: the height is less than 1in]
        ! You can't use `\end' in internal vertical mode.
        \bye ->\par \vfill \supereject \end
                                           
        l.5 drawObject(C);
                         
        ?
        [MP to PDF]
        ! I can't find file `endfig;'.
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.7 endfig;
                  
        Please type another input file name:
        ("C:\Programme\MiKTeX 2.7\tex\latex\tools\.tex")
        Runaway argument?
        ! File ended while scanning use of \handleMPsequence.
        <inserted text>
                        \par
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.7 endfig;
                  
        ?
        [warning: the width is less than 1in] [warning: the height is less than 1in]
        ! You can't use `\end' in internal vertical mode.
        \bye ->\par \vfill \supereject \end
                                           
        l.7 endfig;
                  
        ?
        [MP to PDF]
        ! I can't find file `end'.
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.8 end
              
        Please type another input file name:
        ("C:\Programme\MiKTeX 2.7\tex\latex\tools\.tex")
        Runaway argument?
        ! File ended while scanning use of \handleMPsequence.
        <inserted text>
                        \par
        <to be read again>
                           \relax
        \processMPfile ...vbox {\convertMPtoPDF {#1}{1}{1}
                                                          }\ifdim \wd 0<1in \message...
        l.8 end
              
        ?
        [warning: the width is less than 1in] [warning: the height is less than 1in]
        ! You can't use `\end' in internal vertical mode.
        \bye ->\par \vfill \supereject \end
                                           
        l.8 end
              
        ?
        )
        *
        (Please type a command or say `\end')
        *
        (Please type a command or say `\end')
        *
        (Please type a command or say `\end')
        *
        (Please type a command or say `\end')
        *\end
        ! You can't use `\end' in internal vertical mode.
        <*> \end
               
        ? \end
        Type <return> to proceed, S to scroll future error messages,
        R to run without stopping, Q to run quietly,
        I to insert something,
        1 or ... or 9 to ignore the next 1 to 9 tokens of input,
        H for help, X to quit.
        ?

        *
        (Please type a command or say `\end')
        *
        (Please type a command or say `\end')
        *\end
        ! You can't use `\end' in internal vertical mode.
        <*> \end
               
        ?

        *\end
        ! You can't use `\end' in internal vertical mode.
        <*> \end
               
        ? \end
        Type <return> to proceed, S to scroll future error messages,
        R to run without stopping, Q to run quietly,
        I to insert something,
        1 or ... or 9 to ignore the next 1 to 9 tokens of input,
        H for help, X to quit.
        ? \end
        Type <return> to proceed, S to scroll future error messages,
        R to run without stopping, Q to run quietly,
        I to insert something,
        1 or ... or 9 to ignore the next 1 to 9 tokens of input,
        H for help, X to quit.
        ? x

        Here is how much of TeX's memory you used:
        222 strings out of 97040
        1904 string characters out of 1203068
        16295 words of memory out of 1500000
        1895 multiletter control sequences out of 110000
        7 words of font info for 0 fonts, out of 1200000 for 2000
        0 hyphenation exceptions out of 8191
        7i,14n,4p,120b,482s stack positions out of 5000i,500n,10000p,200000b,5000s
        No pages of output.
        PDF statistics:
        0 PDF objects out of 1000 (max. 8388607)
        0 named destinations out of 1000 (max. 131072)
        1 words of extra memory for PDF output out of 10000 (max. 10000000)