使用云SDK 3.9.0的S/4Hana内部部署Spring引导应用程序

使用云SDK 3.9.0的S/4Hana内部部署Spring引导应用程序,sdk,cloud,cloud-foundry,sap-cloud-platform,s4hana,Sdk,Cloud,Cloud Foundry,Sap Cloud Platform,S4hana,我正在尝试编写一个SpringBoot应用程序(Gradle),它将通过CloudConnector从S/4Hana内部部署系统查询数据 仅供参考: 我已经运行了Java(Maven)应用程序(来自SAP的示例),运行良好。因此,我的云设置应该是好的 当我将Spring Boot应用程序部署到Cloud Foundry时,我收到以下错误消息: 2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT *************************

我正在尝试编写一个SpringBoot应用程序(Gradle),它将通过CloudConnector从S/4Hana内部部署系统查询数据

仅供参考: 我已经运行了Java(Maven)应用程序(来自SAP的示例),运行良好。因此,我的云设置应该是好的

当我将Spring Boot应用程序部署到Cloud Foundry时,我收到以下错误消息:

   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT ***************************
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT APPLICATION FAILED TO START
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT ***************************
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT Description:
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT An attempt was made to call a method that does not exist. The attempt was made from the following location:
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT     com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationLoader.<clinit>(ScpCfDestinationLoader.java:53)
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT The following method did not exist:
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT     com.sap.cloud.sdk.cloudplatform.cache.CacheManager.register(Lcom/github/benmanes/caffeine/cache/Cache;)Lcom/github/benmanes/caffeine/cache/Cache;
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT The method's class, com.sap.cloud.sdk.cloudplatform.cache.CacheManager, is available from the following locations:
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT     jar:file:/home/vcap/app/BOOT-INF/lib/caching-2.22.0.jar!/com/sap/cloud/sdk/cloudplatform/cache/CacheManager.class
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT     jar:file:/home/vcap/app/BOOT-INF/lib/caching-3.9.0.jar!/com/sap/cloud/sdk/cloudplatform/cache/CacheManager.class
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT It was loaded from the following location:
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT     jar:file:/home/vcap/app/BOOT-INF/lib/caching-2.22.0.jar!/
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT Action:
   2019-12-18T13:58:34.26+0100 [APP/PROC/WEB/0] OUT Correct the classpath of your application so that it contains a single, compatible version of com.sap.cloud.sdk.cloudplatform.cache.CacheManager
   2019-12-18T13:58:34.39+0100 [APP/PROC/WEB/0] OUT Exit status 1
manifest.yml如下所示:


我是否缺少一些依赖项或*.yml错误?

好的,我找到了原因,但我不明白为什么会出现这种问题: 如果我使用:

DestinationAccessor.tryGetDestination("myDestination")
我明白了!当我试着去目的地的时候

DestinationAccessor.getDestination("myDestination")
没问题

DestinationAccessor.getDestination("myDestination")