Ran into this when registering a connector whose type isn't available in that connect instance. The spec object is null in the programmatically created GetPluginsCommand object:
kcctl apply -f register-etcd.json
Specified class isn't a valid connector type. The following connector type(s) are available:
java.lang.NullPointerException: Cannot invoke "picocli.CommandLine$Model$CommandSpec.commandLine()" because "this.spec" is null
at org.kcctl.command.GetPluginsCommand.call(GetPluginsCommand.java:84)
at org.kcctl.command.ApplyCommand.createOrUpdateConnector(ApplyCommand.java:202)
at org.kcctl.command.ApplyCommand.applyOrValidateConnector(ApplyCommand.java:161)
at org.kcctl.command.ApplyCommand.call(ApplyCommand.java:142)
at org.kcctl.command.ApplyCommand.call(ApplyCommand.java:43)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at io.quarkus.picocli.runtime.PicocliRunner$EventExecutionStrategy.execute(PicocliRunner.java:26)
at picocli.CommandLine.execute(CommandLine.java:2170)
at io.quarkus.picocli.runtime.PicocliRunner.run(PicocliRunner.java:40)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:130)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:61)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:32)
Ran into this when registering a connector whose type isn't available in that connect instance. The
specobject is null in the programmatically createdGetPluginsCommandobject: