plantuml reaching java io exception

+1 vote
asked Jul 24, 2015 in To be sorted by rostyfarian (120 points)

Hi,

I'm on a windows 7 platform, using GitBash.

When I run a command such as:

java -jar $PLANTUML temp.uml

I'm getting:

java.io.IOException: The pipe has been ended
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at java.io.FilterOutputStream.write(Unknown Source)
at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:180)
at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:120)
at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:77)
java.lang.IllegalStateException: Timeout4 IO_EXCEPTION2 java.io.IOException: The pipe has been ended
at net.sourceforge.plantuml.svek.DotStringFactory.getSvg(DotStringFactory.java:260)
at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek2.createFile(CucaDiagramFileMakerSvek2.java:212)
at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:114)
at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:87)
at net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:314)
at net.sourceforge.plantuml.classdiagram.ClassDiagram.exportDiagramInternal(ClassDiagram.java:205)
at net.sourceforge.plantuml.UmlDiagram.exportDiagram(UmlDiagram.java:249)
at net.sourceforge.plantuml.PSystemUtils.exportDiagramsCuca(PSystemUtils.java:206)
at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:69)
at net.sourceforge.plantuml.SourceFileReader.getGeneratedImages(SourceFileReader.java:130)
at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:394)
at net.sourceforge.plantuml.Run.processArgs(Run.java:316)
at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:291)
at net.sourceforge.plantuml.Run.main(Run.java:135)
Caused by: java.io.IOException: The pipe has been ended
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at java.io.FilterOutputStream.write(Unknown Source)
at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:180)
at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:120)
at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:77)
 
+++
 
Now, poling around online, I thought it may have to do with my graphViz installation.
So next I tried:
$ echo $GRAPHVIZ_DOT
C:\Program Files (x86)\Graphviz 2.28\bin\dot.exe.
 
and
 
dot -V
dot - graphviz version 2.28.0 (20110507.0327)
 
and...
 
$ java -jar $PLANTUML  -V
(0.000 - 15 Mo) 14 Mo - PlantUML Version 8028
(0.002 - 15 Mo) 14 Mo - GraphicsEnvironment.isHeadless() false
 
  (while checking for possible version mismatches)
 
and...
 
java -jar $PLANTUML  -testdot
The environment variable GRAPHVIZ_DOT has been set to C:\Program Files (x86)\Gra
phviz 2.28\bin\dot.exe.
Dot executable is C:\Program Files (x86)\Graphviz 2.28\bin\dot.exe.
Dot version: dot.exe. - graphviz version 2.28.0 (20110507.0327)
Error: dot generates empty file. Check you dot installation.
 
and finally, the recommended thing for checking out dot-
 
dot -Tsvg -otest.svg dottest.txt
 
which produced a reasonable looking svg file.
 
oh, also tried - 
 
java -jar $PLANTUML  test4.txt
 
and this produced a png which says that dot/Graphviz has crashed.
more tidbits from that png file:
os.Version:6.1
os.name: Windows 7
java.vm.vendor: Sun MicroSystems inc
java.vm.version: 20.45-b01
java.version: 1.6.0_45
user.language: en
Default do version: dot.exe. - graphviz version 2.28.0 (20110507.0327)
 
and some advice to simplify my diagram.
 
any ideas?
 
thanks,
-r
 
 
 
 
 
 
commented Jan 23, 2023 by CeHaKa (100 points)

I run into the same problem.

IO_Exception due to somePath\graphviz\dot.exe

The stacktrace tells me the point of failure

Net.sourceforge.plantuml.svek.DoString.getSvg(….)

It is run on a windows machine in our company. the company policy does not allow the execution of the dot.exe outside of a specified directory.

Is there a way to configure the execution of it somewhere specified?

Thx

chk

PS: Keep up the good work of PlantUML!

1 Answer

0 votes
answered Jul 25, 2015 by plantuml (295,000 points)
Hi,

Did you try with some very simple diagram ?

Something like:

@startuml
class foo
@enduml

Can you tell us if this is working on your config ?

Thanks
...