Spring Cloud CLI throwing IllegalStateException: Cannot download library for launcher spring-boot-thin-launcher

时间:2019-01-18 19:08:30

标签: java spring-cloud

I am in my first hour of Spring Cloud education. Trying to follow directions here to start Eureka. But encounter an IllegalStateException for spring-boot-thin-launcher. Appreciate any pointers on what I could be doing wrong.

Spring Boot CLI installation:

Step 1

$ sdk install springboot 1.5.3.RELEASE

Found a previously downloaded springboot 1.5.3.RELEASE archive. Not downloading it again...

Installing: springboot 1.5.3.RELEASE
Done installing!

Do you want springboot 1.5.3.RELEASE to be set as default? (Y/n): Y

Setting springboot 1.5.3.RELEASE as default.

Step 2:

$ sdk use springboot 1.5.3.RELEASE // Redundant but executing just to be sure

Using springboot version 1.5.3.RELEASE in this shell.

Installing Spring Cloud CLI:

$ spring install org.springframework.cloud:spring-cloud-cli:1.3.1.RELEASE
Installing into: /Users/strut/.sdkman/candidates/springboot/1.5.3.RELEASE/lib/ext

Starting Eureka and the resulting exception:

$ spring cloud eureka
Jan 18, 2019 11:40:18 AM org.springframework.cloud.launcher.cli.LauncherCommand run
SEVERE: Error running spring cloud
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.cloud.launcher.cli.LauncherCommand$LauncherOptionHandler.run(LauncherCommand.java:115)
    at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:84)
    at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54)
    at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219)
    at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171)
    at org.springframework.boot.cli.SpringCli.main(SpringCli.java:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.IllegalStateException: Cannot download library for launcher org.springframework.boot.experimental:spring-boot-thin-launcher:jar:exec:1.0.0.RELEASE
    at org.springframework.boot.loader.wrapper.ThinJarWrapper$Library.download(ThinJarWrapper.java:194)
    at org.springframework.boot.loader.wrapper.ThinJarWrapper.getUrls(ThinJarWrapper.java:113)
    at org.springframework.boot.loader.wrapper.ThinJarWrapper.getClassLoader(ThinJarWrapper.java:105)
    at org.springframework.boot.loader.wrapper.ThinJarWrapper.launch(ThinJarWrapper.java:90)
    at org.springframework.boot.loader.wrapper.ThinJarWrapper.main(ThinJarWrapper.java:77)
    ... 18 more

Following directions from this question moved my $HOME/.m2 and tried starting Eureka. But that resulted in:

org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.bouncycastle:bcpkix-jdk15on:jar:1.55 from/to central (http://repo1.maven.org/maven2/): Bad file descriptor (connect failed).

Others seem to have this issue when running behind a proxy. But I am not running on a corporate network.

0 个答案:

没有答案