spring-cloud / spring-cloud-cli

Spring Cloud CLI features
Apache License 2.0
156 stars 80 forks source link

Error reporting using local file coordinates #138

Open linqin07 opened 4 years ago

linqin07 commented 4 years ago

I want to replace the spring cloud cli default service with the local Eureka service, but an error is reported,I wonder if there are other configurations I didn't add

spring:
  cloud:
    launcher:
      deployables:
        eureka1:
          coordinates: file://D:/IDEAWorkspace/Spring-Cloud/eureka/target/eureka-server-1.0-SNAPSHOT.jar:eureka-server-1.0-SNAPSHOT.jar
          port: 8763
$ spring cloud eureka1

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.6.RELEASE)

2019-12-26 13:29:05.593  INFO 10316 --- [           main] o.s.c.l.deployer.DeployerApplication     : Starting DeployerApplication v2.1.0.RELEASE on LAPTOP-TLF649P1 with PID 10316 (F:\.m2\repository\org\springframework\cloud\launcher\spring-cloud-launcher-deployer\2.1.0.RELEASE\spring-cloud-launcher-deployer-2.1.0.RELEASE.jar started by ▒▒▒▒ in D:\IDEAWorkspace\Spring-Cloud\spring-2.1.0.RELEASE)
2019-12-26 13:29:05.595  INFO 10316 --- [           main] o.s.c.l.deployer.DeployerApplication     : No active profile set, falling back to default profiles: default
2019-12-26 13:29:06.602  INFO 10316 --- [           main] o.s.c.l.deployer.DeployerApplication     : Started DeployerApplication in 1.565 seconds (JVM running for 6.117)
2019-12-26 13:29:06.727 ERROR 10316 --- [           main] o.s.cloud.launcher.cli.LauncherCommand   : Error running spring cloud

java.lang.reflect.InvocationTargetException: null
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
        at org.springframework.cloud.launcher.cli.LauncherCommand$LauncherOptionHandler.run(LauncherCommand.java:115) ~[na:na]
        at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:84) [classes!/:2.1.0.RELEASE]
        at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54) [classes!/:2.1.0.RELEASE]
        at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219) [classes!/:2.1.0.RELEASE]
        at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171) [classes!/:2.1.0.RELEASE]
        at org.springframework.boot.cli.SpringCli.main(SpringCli.java:63) [classes!/:2.1.0.RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [spring-boot-cli-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [spring-boot-cli-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [spring-boot-cli-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [spring-boot-cli-2.1.0.RELEASE.jar:2.1.0.RELEASE]
Caused by: java.lang.reflect.InvocationTargetException: null
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
        at org.springframework.boot.loader.wrapper.ThinJarWrapper.launch(ThinJarWrapper.java:140) ~[spring-cloud-launcher-deployer-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.boot.loader.wrapper.ThinJarWrapper.main(ThinJarWrapper.java:107) ~[spring-cloud-launcher-deployer-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        ... 18 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [spring-boot-cli-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [spring-boot-cli-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [spring-boot-cli-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.boot.loader.thin.ThinJarLauncher.launch(ThinJarLauncher.java:193) ~[spring-boot-thin-launcher-1.0.15.RELEASE.jar:1.0.15.RELEASE]
        at org.springframework.boot.loader.thin.ThinJarLauncher.main(ThinJarLauncher.java:140) ~[spring-boot-thin-launcher-1.0.15.RELEASE.jar:1.0.15.RELEASE]
        ... 24 common frames omitted
Caused by: java.lang.NullPointerException: null
        at java.util.HashMap.putMapEntries(HashMap.java:500) ~[na:1.8.0_91]
        at java.util.HashMap.putAll(HashMap.java:784) ~[na:1.8.0_91]
        at org.springframework.cloud.launcher.deployer.Deployer.deployInternal(Deployer.java:183) ~[spring-cloud-launcher-deployer-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.cloud.launcher.deployer.Deployer.deploy(Deployer.java:108) ~[spring-cloud-launcher-deployer-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.cloud.launcher.deployer.DeployerApplication.launch(DeployerApplication.java:121) ~[spring-cloud-launcher-deployer-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.cloud.launcher.deployer.DeployerApplication.run(DeployerApplication.java:64) ~[spring-cloud-launcher-deployer-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        at org.springframework.cloud.launcher.deployer.DeployerApplication.main(DeployerApplication.java:54) ~[spring-cloud-launcher-deployer-2.1.0.RELEASE.jar:2.1.0.RELEASE]
        ... 33 common frames omitted
zhangsen1996 commented 3 years ago

I also encountered the same problem