PlantUML (or Graphviz) installation woes

I’ve got a few Graphviz diagrams I’d like to incorporate into my XWiki instance. Looking around it seems that the appropriate way to handle this is with the PlantUML extension, available through the extension installation manager.

(If there is a Graphviz plugin I didn’t find it, but that would be my preferred solution.)

I dutifully installed the PlantUML extension, and “out of the box” it works just fine. However, I don’t really want my diagrams to be rendered by an external server, particularly as they describe parts of our network infrastructure and could be considered confidential information.

The documentation for the PlantUML macro seems to say quite clearly that in such instances the embedded server can be used (subject to having Graphviz installed locally, which I do):

You can also configure the macro to use your own PlantUML server […]. Another option is to leave the PlantUML server field empty, in which case the macro will use PlantUML in embedded mode […]

If I edit the configuration page to remove the external server URL, leaving the field empty as described, I get Groovy errors when trying to render any PlantUML code:

Failed to execute the [groovy] macro. Cause: [startup failed: script1541444750736207495166.groovy: 26: unable to resolve class SourceStringReader @ line 26, column 20. def reader = new SourceStringReader("@startuml\n"+umltext+"\n@enduml") ^ 1 error ]. Click on this message for details.

Clicking on the message drops out a full stacktrace which starts

org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Script Macro for content [// Utility class and method from plantUML to encode the UML text. See below the starting point of the macro.

and ends with the triggering cause

Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
script1541444750736207495166.groovy: 26: unable to resolve class SourceStringReader
@ line 26, column 20.
def reader = new SourceStringReader("@startuml\n"+umltext+"\n@enduml")

I installed the extension as an administrative user. I’m creating the pages containing the macro as the same administrative user, so I don’t think it’s a user rights issue for scripting.

Any suggestions, please?