使用 Spring Boot devtools 的 Spring STS 3.9.0 问题

Issue with Spring STS 3.9.0 with Spring Boot devtools

我这周升级到 Spring STS 的新 3.9.0 版本。一切都很好,除了当我启动 Spring 引导网络应用程序(spring 引导版本 1.5.3)时,出现错误。

An internal error occurred during: "Ready state poller".
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2199)
    at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3936)
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4806)
    at org.springframework.ide.eclipse.boot.dash.model.LocalCloudServiceDashElement.getLaunchConfigs(LocalCloudServiceDashElement.java:144)
    at org.springframework.ide.eclipse.boot.dash.model.AbstractLaunchConfigurationsDashElement.stateChanged(AbstractLaunchConfigurationsDashElement.java:434)
    at org.springframework.ide.eclipse.boot.dash.model.AbstractLaunchConfigurationsDashElement.stateChanged(AbstractLaunchConfigurationsDashElement.java:1)
    at org.springframework.ide.eclipse.boot.dash.util.RunStateTracker.updateOwnerStatesAndFireEvents(RunStateTracker.java:216)
    at org.springframework.ide.eclipse.boot.dash.util.RunStateTracker.access[=12=](RunStateTracker.java:208)
    at org.springframework.ide.eclipse.boot.dash.util.RunStateTracker.gotValue(RunStateTracker.java:151)
    at org.springframework.ide.eclipse.boot.dash.util.RunStateTracker.gotValue(RunStateTracker.java:1)
    at org.springsource.ide.eclipse.commons.livexp.core.LiveExpression.changed(LiveExpression.java:114)
    at org.springsource.ide.eclipse.commons.livexp.core.LiveExpression.refresh(LiveExpression.java:71)
    at org.springsource.ide.eclipse.commons.livexp.core.LiveVariable.setValue(LiveVariable.java:46)
    at org.springframework.ide.eclipse.boot.dash.util.AbstractPollingAppReadyStateMonitor.run(AbstractPollingAppReadyStateMonitor.java:51)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.lang.NullPointerException
    at org.eclipse.debug.internal.core.LaunchManager.isValidLaunchConfigurationName(LaunchManager.java:2706)
    at org.eclipse.debug.internal.core.LaunchConfigurationType.newInstance(LaunchConfigurationType.java:473)
    at org.springframework.ide.eclipse.boot.launch.cli.CloudCliServiceLaunchConfigurationDelegate.createLaunchConfig(CloudCliServiceLaunchConfigurationDelegate.java:156)
    at org.springframework.ide.eclipse.boot.dash.model.LocalCloudServiceDashElement.load(LocalCloudServiceDashElement.java:68)
    at org.springframework.ide.eclipse.boot.dash.model.LocalCloudServiceDashElement.load(LocalCloudServiceDashElement.java:1)
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315)
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278)
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193)
    ... 15 more

会话数据:

eclipse.buildId=3.9.0.201707061823-RELEASE-e47
java.version=1.8.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.springsource.sts.ide -product org.springsource.sts.ide
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.springsource.sts.ide -data C:\Jeff Local\Workspace\gisp_3.9.0 -product org.springsource.sts.ide

一切都与服务器一起工作,除了当我更改代码时,devtools 不会重新加载应用程序。我必须手动重启它。

我最初使用的是现有工作区(它会自动升级),但我也尝试过:

如果我切换到一个全新的工作区,导入项目并且从未导入我的设置,它终于可以正常启动了。

我希望能够导入我的设置,因为我花了几个月的时间才将其设置为该状态。

我认为您在本期中发布的堆栈跟踪: https://github.com/spring-projects/spring-ide/issues/182

我建议在 GitHub 上跟进该问题。

我曾经遇到过同样的问题,但是在将 spring boot cli 版本从 Boot 1.5.4.RELEASE 更改为 Boot 1.5.8.RELEASE 后,它对我来说工作正常。
下载自 release/org/springframework/boot/spring-boot-cli

将其保存到本地文件夹并在此处添加。清理并重建项目。就这些!