Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

component diagram support #9

Closed
eviveraart opened this issue Jan 31, 2019 · 4 comments
Closed

component diagram support #9

eviveraart opened this issue Jan 31, 2019 · 4 comments

Comments

@eviveraart
Copy link

Thank you for making this amazing package. With a component diagram I made the connection "component --( interface". It worked in plantUML oudside of latex, but with the latex plugin I got the following error.

An error has occured : java.lang.UnsupportedOperationException
I’m both. I’m a celebrity in an emergency.
Diagram size: 29 lines / 533 characters.
PlantUML (1.2019.00) cannot parse result from dot/GraphViz.
Please go to http://plantuml.com/graphviz-dot to check your GraphViz version.
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.8.0_201-b09
Operating System: Windows 7
OS Version: 6.1
Default Encoding: Cp1252
Language: nl
Country: NL
Machine: Kantoor-2-15
PLANTUML_LIMIT_SIZE: 4096
Processors: 4
Max Memory: 1,884,815,360
Total Memory: 231,211,008
Free Memory: 167,578,752
Used Memory: 63,632,256
Thread Active Count: 1
This may be caused by :

  • a bug in PlantUML
  • a problem in GraphViz
    You should send this diagram and this image to plantuml@gmail.com or
    post to http://plantuml.com/qa to solve this issue.
    You can try to turn arround this issue by simplifing your diagram.
    java.lang.UnsupportedOperationException
    net.sourceforge.plantuml.ugraphic.tikz.DriverEllipseTikz.draw(DriverEllipseTikz.java:61)
    net.sourceforge.plantuml.ugraphic.tikz.DriverEllipseTikz.draw(DriverEllipseTikz.java:44)
    net.sourceforge.plantuml.ugraphic.AbstractUGraphic.draw(AbstractUGraphic.java:89)
    net.sourceforge.plantuml.svek.extremity.ExtremityParenthesis.drawU(ExtremityParenthesis.java:67)
    net.sourceforge.plantuml.svek.Line.drawRainbow(Line.java:758)
    net.sourceforge.plantuml.svek.Line.drawU(Line.java:704)
    net.sourceforge.plantuml.svek.SvekResult.drawU(SvekResult.java:92)
    net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:254)
    net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:178)
    net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:127)
    net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:71)
    net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:379)
    net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:238)
    net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:135)
    net.sourceforge.plantuml.PSystemUtils.exportDiagramsCuca(PSystemUtils.java:236)
    net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:92)
    net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:157)
    net.sourceforge.plantuml.Run.manageFileInternal(Run.java:508)
    net.sourceforge.plantuml.Run.processArgs(Run.java:403)
    net.sourceforge.plantuml.Run.manageAllFiles(Run.java:372)
    net.sourceforge.plantuml.Run.main(Run.java:188)
    Diagram source: (Use http://zxing.org/w/decode.jspx to decode the qrcode)
    null
    null

Support for the --( relation would very much be appreciated.

@koppor
Copy link
Owner

koppor commented Mar 7, 2019

Do you have a minimal example so that I can quickly reproduce it?

@eviveraart
Copy link
Author

eviveraart commented Mar 7, 2019

The example I used is this:

@startuml

() "Interface 2" as I2
() "Interface 3" as I3

[component 1] as c1
[component 2] as c2
[component 3] as c3

c1 -- I2
c1 -- I3

I2 )-- c2
I3 )-- c3

@enduml

https://www.planttext.com/ generated the following image:

image

but the package gave the following error:

An error has occured : java.lang.UnsupportedOperationException
Anything that can possibly go wrong, does
Diagram size: 16 lines / 183 characters.
PlantUML (1.2019.00) cannot parse result from dot/GraphViz.
Please go to http://plantuml.com/graphviz-dot to check your GraphViz version.
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.8.0_201-b09
Operating System: Windows 7
OS Version: 6.1
Default Encoding: Cp1252
Language: nl
Country: NL
Machine: Kantoor-2-15
PLANTUML_LIMIT_SIZE: 4096
Processors: 4
Max Memory: 1,884,815,360
Total Memory: 231,211,008
Free Memory: 172,365,320
Used Memory: 58,845,688
Thread Active Count: 1
This may be caused by :
- a bug in PlantUML
- a problem in GraphViz
You should send this diagram and this image to plantuml@gmail.com or
post to http://plantuml.com/qa to solve this issue.
You can try to turn arround this issue by simplifing your diagram.
java.lang.UnsupportedOperationException
net.sourceforge.plantuml.ugraphic.tikz.DriverEllipseTikz.draw(DriverEllipseTikz.java:61)
net.sourceforge.plantuml.ugraphic.tikz.DriverEllipseTikz.draw(DriverEllipseTikz.java:44)
net.sourceforge.plantuml.ugraphic.AbstractUGraphic.draw(AbstractUGraphic.java:89)
net.sourceforge.plantuml.svek.extremity.ExtremityParenthesis.drawU(ExtremityParenthesis.java:67)
net.sourceforge.plantuml.svek.Line.drawRainbow(Line.java:758)
net.sourceforge.plantuml.svek.Line.drawU(Line.java:704)
net.sourceforge.plantuml.svek.SvekResult.drawU(SvekResult.java:92)
net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:254)
net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:178)
net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:127)
net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:71)
net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:379)
net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:238)
net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:135)
net.sourceforge.plantuml.PSystemUtils.exportDiagramsCuca(PSystemUtils.java:236)
net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:92)
net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:157)
net.sourceforge.plantuml.Run.manageFileInternal(Run.java:508)
net.sourceforge.plantuml.Run.processArgs(Run.java:403)
net.sourceforge.plantuml.Run.manageAllFiles(Run.java:372)
net.sourceforge.plantuml.Run.main(Run.java:188)
Diagram source: (Use http://zxing.org/w/decode.jspx to decode the qrcode)
null

With the following code I do get the same image in the package and on https://www.planttext.com/

@startuml

() "Interface 1" as I1
() "Interface 2" as I2

[component 1] as c1
[component 2] as c2
[component 3] as c3

c1 -- I1
c1 -- I2

I1 <-- c2
I2 <-- c3

@enduml

Wich is:

image

That is why I think it is in this part I1 )-- c2

I hope this helps

@koppor
Copy link
Owner

koppor commented Mar 7, 2019

To reproduce the issue with planuml, execute

java -jar C:\ProgramData\chocolatey\lib\plantuml\tools\plantuml.jar -tlatex:nopreamble example-component-diagram-plantuml.txt

example-component-diagram-plantuml.txt has following content:

@startuml
() "Interface 2" as I2
() "Interface 3" as I3

[component 1] as c1
[component 2] as c2
[component 3] as c3

c1 -- I2
c1 -- I3

I2 )-- c2
I3 )-- c3
@enduml

Workaround: Use SVG.

Minimal example:

\documentclass{scrartcl}
\usepackage{graphics}

% Enables inclusion of SVG graphics - 1:1 approach
% This is NOT the approach of https://ctan.org/pkg/svg-inkscape
% which allows text in SVG to be typeset using LaTeX.
% We just include the SVG as is.
\usepackage{epstopdf}
\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{%
  inkscape -z --file=#1 --export-pdf=\OutputFile
}

\usepackage[output=svg]{plantuml}

\begin{document}
\begin{plantuml}
@startuml
() "Interface 2" as I2
() "Interface 3" as I3

[component 1] as c1
[component 2] as c2
[component 3] as c3

c1 -- I2
c1 -- I3

I2 )-- c2
I3 )-- c3
@enduml
\end{plantuml}
\end{document}

Please have inkscape in your path!

It is a general plantuml issue. See the minimal example at plantuml/plantuml#178.

@koppor
Copy link
Owner

koppor commented Sep 23, 2019

plantuml/plantuml#178 is fixed, so I close this issue.

@koppor koppor closed this as completed Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants