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.

Ubuntu PDF problem

0 votes

Hey there,

we're using plantuml to generate our diagrams in our documents. The main development is done under Windows (Cygwin). Now I'm trying to set up a jenkins server that triggers the diagram/document generation.

We have all necessary files in one folder:

and our call is always the same:
java -cp <absolute-path-to-all-jars> net.sourceforge.plantuml.Run -failfast2 -nbtread auto -charset UTF-8 -o . -v -tpdf *.uml
Ubuntu output:
Are my dependencies still up-to-date? There are newer version of batik available.
Thx & Bye,
asked Apr 11 by aronadaal (340 points)

3 Answers

0 votes

Ok, I tried further... The problem resides in the classpath. Linux doesn't accept a generic classpath like

-cp /path/*

I had to specify all jar files by hand. But the generation of one image takes a lot of time! More than on Windows and the Build-Server (Xeon powered) should be much faster! On windows  it only takes a few seconds. The graphic size seams to be much bigger (16KB vs 1.3MB).

This is the command:

java -Xmx1024m -classpath ./plantuml/batik-all-1.7.jar:./plantuml/avalon-framework-4.2.0.jar:./plantuml/plantuml.jar:./plantuml/fop.jar:./plantuml/commons-io-1.3.1.jar:./plantuml/commons-logging-1.0.4.jar:./plantuml/org.eclipse.jgit- net.sourceforge.plantuml.Run -failfast2 -nbtread auto -charset UTF-8 -o . -v -tpdf *.uml


and the output:



answered Apr 11 by aronadaal (340 points)
reshown Apr 12 by aronadaal
0 votes
answered Apr 11 by plantuml (125,210 points)
batik is running now, but I get a much bigger image (Windows: 16kb, Linux: 1,3MB) and the process takes about 50s. Any idea?

The output is linked in my answer above.
0 votes

Ok, I found the my bug and got a feature request for plantuml.

1) slow generation and bloated diagram

During my try and error to get rid of the java.lang.UnsupportedOperationException: PDF error I didn't use our DiagramStylesheet. I commented it out and forgot that there was an option skinparam componentStyle uml2 on which the test diagram heavly relies on. Having this option enabled the diagram size and compilation speed get back to normal.

2) cryptic expection

But where comes the exception from? This took my some time... far too much time! As mentioned above we use a custom Stylesheet with all our skinparams we need for diagram generation. I forgot to put this in the repository so the plantuml run failed. angry

Could you please add a verification step that looks after all included files (!include xyz)  before starting the compilation run? An useful error message would be really nice, in case that the included file(s) cannot be found.

Thx & bye,


answered Apr 12 by aronadaal (340 points)
> Could you please add a verification step that looks after all included files
> (!include xyz)  before starting the compilation run
I think that this is happing if you use -failfast2 flag
Can you check it ?
yes, I'm using "-failfast2". Will plantuml make no check for includes when this option is used?
1) We've build a new beta
that prints a useful error message when an included file cannot be found

2) I am wondering if *before* running PlantUML with -failfast2, you should not run it once with -checkonly flag. This would be quick verification step for you.
Support This Project Offer 250 Mo! Follow PlantUML on Twitter