Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlantUML generator crashes on a file with only BoundedContexts #11

Open
dotnich-io opened this issue Jan 9, 2024 · 1 comment
Open

Comments

@dotnich-io
Copy link

dotnich-io commented Jan 9, 2024

Steps to reproduce:

  • Have .cml file that contains only BoundedContexts. (see this gist for an example)
  • Run the plantuml generator:
./context-mapper-cli-6.10.0/bin/cm generate -g plantuml -i contexts.cml -o src-gen

Expected results:

  • execution succeeds
  • src-gen/ contains plantuml digrams for each context & domain implementation

Actual results:

  • execution exits with the following exception:
Context Mapper CLI v6.10.0
Exception in thread "main" java.lang.ClassCastException: class org.contextmapper.dsl.contextMappingDSL.impl.DomainPartImpl cannot be cast to class org.contextmapper.dsl.contextMappingDSL.Subdomain (org.contextmapper.dsl.contextMappingDSL.impl.DomainPartImpl and org.contextmapper.dsl.contextMappingDSL.Subdomain are in unnamed module of loader 'app')
        at org.contextmapper.dsl.generator.plantuml.PlantUMLBoundedContextClassDiagramCreator.lambda$getSubdomains$0(PlantUMLBoundedContextClassDiagramCreator.java:138)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at org.contextmapper.dsl.generator.plantuml.PlantUMLBoundedContextClassDiagramCreator.getSubdomains(PlantUMLBoundedContextClassDiagramCreator.java:134)
        at org.contextmapper.dsl.generator.plantuml.PlantUMLBoundedContextClassDiagramCreator.printLegend(PlantUMLBoundedContextClassDiagramCreator.java:68)
        at org.contextmapper.dsl.generator.plantuml.PlantUMLBoundedContextClassDiagramCreator.printDiagramContent(PlantUMLBoundedContextClassDiagramCreator.java:64)
        at org.contextmapper.dsl.generator.plantuml.PlantUMLBoundedContextClassDiagramCreator.printDiagramContent(PlantUMLBoundedContextClassDiagramCreator.java:39)
        at org.contextmapper.dsl.generator.plantuml.AbstractPlantUMLDiagramCreator.createDiagram(AbstractPlantUMLDiagramCreator.java:31)
        at org.contextmapper.dsl.generator.PlantUMLGenerator.generateFromContextMappingModel(PlantUMLGenerator.java:67)
        at org.contextmapper.dsl.generator.AbstractContextMappingModelGenerator.doGenerate(AbstractContextMappingModelGenerator.java:54)
        at org.contextmapper.dsl.standalone.StandaloneContextMapper.callGenerator(StandaloneContextMapper.java:61)
        at org.contextmapper.cli.commands.GenerateCommand.run(GenerateCommand.java:55)
        at org.contextmapper.cli.ContextMapperCLI.run(ContextMapperCLI.java:59)
        at org.contextmapper.cli.ContextMapperCLI.main(ContextMapperCLI.java:44)

Supporting info

If I have the contexts.cml file open in VS Code, and run "Generate PlantUML diagrams" from it, I get the diagrams I expect.

@dotnich-io dotnich-io changed the title PlantUML generator doesn't create all available diagrams PlantUML generator crashes on a file with only BoundedContexts Jan 9, 2024
@dotnich-io
Copy link
Author

NB: I found this while attempting to build a workaround for this issue in the extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant