Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Error: dot generates empty file.

0 votes
The environment variable GRAPHVIZ_DOT has not been set      
Dot executable is /usr/bin/dot                              
Dot version: dot - graphviz version 2.38.0 (20140413.2041)  
Error: dot generates empty file. Check you dot installation.
 

I get this error, but when I tested dot by itself it successfully generated a single class diagram.

I'm running the Eclipse plugin of plantUML, I tried with both 7997 and 8009, both have the same error.

I'm runnnig Eclipse Juno - 20130225-0426

All on a Red Hat Enterprise Linux 5.
asked Nov 14, 2014 in bug by anonymous

1 Answer

0 votes

Hello,

You should try to first run PlantUML from command line :

java -jar plantuml.jar -testdot

And give us the result.

You should also try the following command (see http://plantuml.sourceforge.net/graphvizdot.html )

dot -Tpng -otest.png dottest.txt
answered Nov 14, 2014 by plantuml (124,290 points)
Hi,

Thanks for the very quick reply,

I have tried: dot -Tpng -otest.png dottest.txt and it works. It generated a png with a class box in it.

I am using PlantUML Eclipse plugin, should I run: java -jar plantuml.jar -testdot using the eclipse plantUML jar: net.sourceforge.plantuml.eclipse_1.1.8.8009 instead?

EDIT: Ok, I ran:

java -jar net.sourceforge.plantuml.eclipse_1.1.8.8009.jar -testdot

And it gives me:

Failed to load Main-Class manifest attribute from
net.sourceforge.plantuml.eclipse_1.1.8.8009.jar
It's normal that the java -jar "net.sourceforge.plantuml.eclipse_1.1.8.8009.jar" -testdot command fail, don't pay attention to it.

The plugin itself seems to work fine (and I bet that sequence diagram is working within eclipse).
My guess is that there are some issue with you dot/graphviz installation.
So two more tests:
Could your try:
dot -Tsvg -otest.svg dottest.txt
To check that dot can generate SVG file.

And could you try:
java -jar plantuml.jar test4.txt
where test4.txt contains:
@startuml
class a
class b
a -- b
@enduml

Thanks,
Hi,
I'm Mac OS X 10.11 running IntelliJ IDEA 14 and PlantUML.
* set the environmentvariable GRAPHVIZ_DOT
Did also:
** java -jar plantuml.jar -testdot
** dot -Tpng -otest.png dottest.txt
** java -jar plantuml.jar test4.txt
everything with success.

If I create javadoc in IntelliJ with a 'given' image test2.png
/**
     * Demonstration for PlantUML.
     * <p>
     * Example of use:
     * <p>
     * <img src="test2.png">
     */
the image is available.

if I do:
/**
    @startuml
    Alice -> Bob: Authentication Request
    Bob --> Alice: Authentication Response

    Alice -> Bob: Another authentication Request
    Alice <-- Bob: another authentication Response
    @enduml
    */

    /**
     * Demonstration for PlantUML.
     * <p>
     * Example of use:
     * <p>
     * <img src="test2.png">
     */

I get the following error from Plantuml plugin within IntelliJ:
NoClassDefFoundError
         Failed to render image
         Details: @startuml
         testdot
         @enduml: net/sourceforge/plantuml/SourceStringReader

--> the file exists, but its size is 0kB.
What am I doing wrong?
BR
I have same Problem with eclipse plugin.

testing the dot installation by
dot.exe -Tpng -otest.png dottest.txt
creates the correct test.png

java -jar plantuml.8058.jar test4.txt

produces a test4.png with error :

This is mission control. How are you all doing this lovely morging?

For some reason, dot/Graphviz has crashed.
This has been generated with PlantUML (8058).

Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 65-Bit Server VM
Java Version: 1.8.0_121-b13
Windows10
10.0
Cp1252
de
DE
My Computer Name
PLANTUML_LIMIT_SIZE: 4096
Processors:8
Max Memory: 1,868,038,144
126,877,696
111,223,176
15,654,520
Thread Active Count: 1

Default dot version: dot.exe - graphviz version 2.38.0 (20140413.2041)


java -jar plantuml.8058.jar -graphvizdot d:\MINGW64\opt\graphviz\bin\dot.exe -testdot

The environment variable GRAPHVIZ_DOT has been set to d:\MINGW64\opt\graphviz\bin\dot.exe
Dot executable is d:\MINGW64\opt\graphviz\bin\dot.exe
Dot version: dot - graphviz version 2.38.0 (20140413.2041)
Installation seems OK. File generation OK

java -jar plantuml.8058.jar -graphvizdot d:\MINGW64\opt\graphviz\bin\dot.exe test4.txt

(no output) Image test4.png contain same error like above.
Could you try:
dot.exe -Tsvg -otest.svg dottest.txt
and tell us the result.
Did you compile GraphViz by yourself ?
This produces a working svg, looking the same as the test.png
dot.exe -Tpng -otest.png dottest.txt

I use the last download binary version from graphviz.
perhaps this helps:

d:\MinGW64\opt\graphviz>bin\dot.exe -Tpng -otest.png dottest.txt -v
dot - graphviz version 2.38.0 (20140413.2041)
Using render: cairo:cairo
Using device: png:cairo:cairo
libdir = "d:\MinGW64\opt\graphviz\bin"
Activated plugin library: gvplugin_dot_layout.dll
Using layout: dot:dot_layout
The plugin configuration file:
        d:\MinGW64\opt\graphviz\bin\config6
                was successfully loaded.
    render      :  cairo dot fig gd gdiplus map pic pov ps svg tk vml vrml xdot
    layout      :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout  :  textlayout
    device      :  bmp canon cmap cmapx cmapx_np dot emf emfplus eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg metafile pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp xdot xdot1.2 xdot1.4
    loadimage   :  (lib) bmp eps gd gd2 gif jpe jpeg jpg png ps svg
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
fontname: "Times-Roman" resolved to: (ps:pango  Times New Roman, ) (PangoCairoWin32Font) "Times New Roman, 12"
network simplex:  1 nodes 0 edges maxiter=2147483647 balance=1
network simplex: 1 nodes 0 edges 0 iter 0.00 sec
Maxrank = 0, minrank = 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross unix: 0 crossings, 0.00 secs.
network simplex:  1 nodes 0 edges maxiter=2147483647 balance=2
network simplex: 1 nodes 0 edges 0 iter 0.00 sec
routesplines: 0 edges, 0 boxes 0.00 sec
Using render: cairo:cairo
Using device: png:cairo:cairo
dot: allocating a 28K cairo image surface (99 x 73 pixels)
Using render: cairo:cairo
Using loadimage: png:cairo:cairo
gvRenderJobs unix: 0.01 secs.
Could you send us a email (plantuml@gmail.com), it will be easier.
Thanks!
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...