"Function not found ContainerDb" error when rendering sample Deployment diagram in PlantUML 1.2021.2 (C4 v.2.0.0)

0 votes
asked Mar 16 in Question / help by 1derer

Hello everyone.

I'm trying to render the sample Deployment diagram locally (https://github.com/plantuml-stdlib/C4-PlantUML/blob/releases/v2/samples/C4_Deployment%20Diagram%20Sample%20-%20bigbankplc.puml) and I'm getting an error where PlantUML is not recognizing the ContainerDb macro:

   Function not found ContainerDb

The only thing I'm changing is that since I don't have access to internet I'm removing the following line:

   !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/v2.0.1/C4_Deployment.puml

and adding the following so it's able to load the local version of the Deployment library (C4 v.2.0.0), that should in turn have an Include call to the Container library in its header:

   !include <C4/C4_Deployment.puml>

It's clearly loading the Container.puml file or else it would have a recursive error, so why is it not able to identify the ContainerDb macro included in that library?

I also tried explicitly loading the Container library on top of the Deployment include with a similar line using the same syntax:

   !include <C4/C4_Container.puml>

 but I get the same error.

Thanks.

2 Answers

0 votes
answered Mar 16 by The-Lu (33,360 points)

Hello 1.,

If you add:

!include <C4/C4_Deployment.puml>

It seems OK, on the v1.2021.2:

See also old defect about C4 here:

And see documentation here:

If that can help,
Regards,
Th.

commented Mar 19 by 1derer
edited Mar 19

I kept playing with it a bit and I noticed the problem is that the use of tags is not working. I'm running PlantUML 1.2021.2 that comes with C4 v.2.0.0, and the only way to make this sample work is to comment out the "AddTagSupport" line at the beginning and removing the "&tags=" parameters from all the ContainerDb macro calls.

Also, judging by the image you posted there (linked to the online server) you're not running this on 1.2021.2, but 1.2021.3beta7, and you're not running the same sample I am, but the one that doesn't have the Tag declaration, else it would render the Secondary Oracle node with a grey background.

Would you be so kind to confirm if tags are supported in this version of PlantUML or if they were added from C4 v.2.0.1 and upwards? Maybe it's working for you because you have access to internet and you're actually loading C4 v.2.0.1 from the RAW repo. instead of the libraries that come with v.2.0.0 by default or because you're not running the sample with the Tags.

Thanks.

commented Mar 21 by The-Lu (33,360 points)

Hello 1.,

You are right, for sum-up:

1/ Current PlantUML version (1.2021.1 or 1.2021.2 or 1.2021.3beta...) use the C4 v2.0.0 see: https://github.com/plantuml/plantuml-stdlib/tree/master/C4

2/ There is a new version of C4 a v2.0.1, see: https://github.com/plantuml-stdlib/C4-PlantUML/releases

@PlantUML or @C4-maintainer:

  • Could you update PlantUML (make update or PR) to the last C4 version?


Same thing with Archimate...
See similar request here: https://forum.plantuml.net/12877/question-archimate-rel_association_dir-stdlib-archimate

Then:

  • If the maintainers can do PR when a new stable version is available, it might help the PlantUML team to update the stdlib... wink

Regards,
Th.

commented Mar 22 by plantuml (259,840 points)
We have update last release with stdlib C4 and Archimate.

It would be indeed nice if people could create PR on https://github.com/plantuml/plantuml-stdlib :-)
commented Mar 22 by 1derer (180 points)
If I'm not allowed to update manually (company server with latest containerized stable package), do I just wait for the next PlantUML version to come out (e.g.: 1.2021.3) for it to include this STDLIB update that you guys deployed today? or does it take more reviews before it's promoted to new PlantUML release?

Thanks.
0 votes
answered Jul 30 by kirchsth (1,590 points)
release 1.2021.9 is delivered with last version of C4 v2.3.0.
https://github.com/plantuml/plantuml-stdlib/pull/42
Regards,
Helmut
...