structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
500 stars 77 forks source link

java.lang.IllegalStateException: Failed to execute CommandLineRunner at startup #17

Closed mlamothe closed 3 years ago

mlamothe commented 3 years ago

Forgive me if I've forgotten something obvious - I am not a Java developer.

I'm trying to follow along with this blog post: https://dev.to/simonbrown/getting-started-with-the-structurizr-cli-10c2

I'm on Windows 10.

java -version

openjdk version "1.8.0_275"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_275-b01)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.275-b01, mixed mode)

structurizr


Structurizr CLI v1.5.0
Usage: structurizr push|pull|export [options]
>structurizr export -workspace getting-started.dsl -format plantuml

Structurizr CLI v1.5.0 Exporting workspace from getting-started.dsl

java.lang.IllegalStateException: Failed to execute CommandLineRunner at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798) [spring-boot-2.3.0.RELEASE.jar!/:2.3.0.RELEASE] at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:779) [spring-boot-2.3.0.RELEASE.jar!/:2.3.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:322) [spring-boot-2.3.0.RELEASE.jar!/:2.3.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar!/:2.3.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar!/:2.3.0.RELEASE] at com.structurizr.cli.StructurizrCliApplication.main(StructurizrCliApplication.java:69) [classes!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_275] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_275] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_275] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_275] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [structurizr-cli-1.5.0.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) [structurizr-cli-1.5.0.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [structurizr-cli-1.5.0.jar:na] at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [structurizr-cli-1.5.0.jar:na] Caused by: java.lang.NullPointerException: null at java.io.File.(File.java:279) ~[na:1.8.0_275] at com.structurizr.cli.ExportCommand.run(ExportCommand.java:118) ~[classes!/:na] at com.structurizr.cli.StructurizrCliApplication.run(StructurizrCliApplication.java:40) [classes!/:na] at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:795) [spring-boot-2.3.0.RELEASE.jar!/:2.3.0.RELEASE] ... 13 common frames omitted



Thank you for your help!
simonbrowndotje commented 3 years ago

This sounds like a duplicate of #16 that's been fixed, but not released. In the meantime, you should be able to work around this by adding the -output parameter.

mlamothe commented 3 years ago

Ah you're right, it is the same issue and -output did the trick. Thank you for the quick response!