Export as PDF problem - using "partition" keyword with new activity diagram syntax

0 votes
asked Jan 11, 2016 in Bug by DaRolla (360 points)
edited Jan 12, 2016 by DaRolla
Hi there,

I am using PlantUML for a while now, and rendering PNGs works fine. And I am using ANT (well using BATCH would lead to the same error).

Using this code I can generate a PNG

    @startuml
    start
        partition "test" {
        }
    end
    @enduml

but trying to generate a PDF leads to the following error stack.

    C:\Users\mschmitz\IdeaProjects\coca-dokumentation\temp\build.xml:11: java.lang.UnsupportedOperationException
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
        at org.apache.tools.ant.Main.runBuild(Main.java:851)
        at org.apache.tools.ant.Main.startAnt(Main.java:235)
        at org.apache.tools.ant.Main.start(Main.java:198)
        at org.apache.tools.ant.Main.main(Main.java:286)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
    Caused by: java.lang.UnsupportedOperationException
        at net.sourceforge.plantuml.graphic.GraphicStrings.exportDiagram(GraphicStrings.java:161)
        at net.sourceforge.plantuml.PSystemError.exportDiagram(PSystemError.java:96)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsDefault(PSystemUtils.java:126)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:70)
        at net.sourceforge.plantuml.SourceFileReader.getGeneratedImages(SourceFileReader.java:130)
        at net.sourceforge.plantuml.ant.PlantUmlTask.doFile(PlantUmlTask.java:202)
        at net.sourceforge.plantuml.ant.PlantUmlTask.processingSingleFile(PlantUmlTask.java:188)
        at net.sourceforge.plantuml.ant.PlantUmlTask.manageFileSet(PlantUmlTask.java:160)
        at net.sourceforge.plantuml.ant.PlantUmlTask.execute(PlantUmlTask.java:107)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        ... 16 more

Greetings,
DaRolla

2 Answers

0 votes
answered Jan 12, 2016 by DaRolla (360 points)
And this is my ANT buildfile:

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="trying to generate PDF" basedir="." default="build">
    
        <taskdef name="plantuml" classname="net.sourceforge.plantuml.ant.PlantUmlTask" classpath="lib/plantuml.jar"/>
    
        <!--
            http://de.plantuml.com/pdf.html
            http://plantuml.sourceforge.net/qa/?qa=1026/instruction-how-enable-pdf-support-seems-not-correct-anymore
        -->
        <target name="build">
            <plantuml verbose="true" overwrite="true" charset="UTF-8" format="pdf">
                <fileset file="Provisionsabrechnung2.puml"/>
            </plantuml>
        </target>
    
    </project>
+1 vote
answered Jan 12, 2016 by plantuml (265,060 points)
Hello,

It may be related to your PlantUML version.
Could you try with the last version ?
We have just tried your example with the last version, and the export to PDF works fine on our config (using command line).

Thanks,
commented Jan 12, 2016 by DaRolla (360 points)
Hi there,

thanks for your response.

Here is a ZIP with all files needed (also including all those JARs):
https://www.dropbox.com/s/oqz8kow0pi7sy1o/PlantUML-Bug.zip?dl=0

Using plantuml.8034.jar I get the same error.

Greetings,
DaRolla
commented Jan 12, 2016 by plantuml (265,060 points)
Ok.
There is an issue with the MANIFEST file of the official release.

It contains:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.4
Created-By: 1.8.0_31-b13 (Oracle Corporation)
Main-Class: net.sourceforge.plantuml.Run


And it should be:

Manifest-Version: 1.0
Class-Path: batik-all-1.7.jar fop.jar
Main-Class: net.sourceforge.plantuml.Run
SplashScreen-Image: net/sourceforge/plantuml/version/logo.png

We will investigate around this, and in the meantime, you can use the beta version
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar
which should work as expected.

Sorry about that, and thanks for the feedback!
commented Jan 12, 2016 by DaRolla (360 points)
Thanks a lot. This did the trick for me. And beside the shadows work as well, that really nice :-)
...