Error: dot generates empty file.

0 votes
asked Nov 14, 2014 in bug by anonymous
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.

1 Answer

0 votes
answered Nov 14, 2014 by plantuml (131,070 points)


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 )

dot -Tpng -otest.png dottest.txt
commented Nov 14, 2014 by anonymous
edited Nov 14, 2014

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
commented Nov 15, 2014 by plantuml (131,070 points)
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:
class a
class b
a -- b

commented Mar 8, 2016 by anonymous
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:
    Alice -> Bob: Authentication Request
    Bob --> Alice: Authentication Response

    Alice -> Bob: Another authentication Request
    Alice <-- Bob: another authentication Response

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

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

--> the file exists, but its size is 0kB.
What am I doing wrong?
commented Mar 13 by anonymous
edited Mar 13
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
My Computer Name
Max Memory: 1,868,038,144
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.
commented Mar 14 by plantuml (131,070 points)
Could you try:
dot.exe -Tsvg -otest.svg dottest.txt
and tell us the result.
Did you compile GraphViz by yourself ?
commented Mar 14 by anonymous
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:
                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.
commented Mar 15 by plantuml (131,070 points)
Could you send us a email (, it will be easier.