简体   繁体   English

Hazelcast 缓存指标错误与 spring 启动 2.1.9.release

[英]Hazelcast Cache metric error with spring boot 2.1.9.release

We are unable to start our spring boot application (version 2.1.9.release) when using Hazelcast(artifact hazelcast-all and version 4.1)使用 Hazelcast(工件 hazelcast-all 和版本 4.1)时,我们无法启动 spring 引导应用程序(版本 2.1.9.release)

We are getting below error:我们收到以下错误:

An attempt was made to call a method that does not exist.试图调用不存在的方法。 The attempt was made from the following location: org.springframework.boot.actuate.metrics.cache.HazelcastCacheMeterBinderProvider.getMeterBinder(HazelcastCacheMeterBinderProvider.java)尝试从以下位置进行:org.springframework.boot.actuate.metrics.cache.HazelcastCacheMeterBinderProvider.getMeterBinder(HazelcastCacheMeterBinderProvider.java)

The following method did not exist:以下方法不存在:

com.hazelcast.spring.cache.HazelcastCache.getNativeCache()Lcom/hazelcast/core/IMap;

The method's class, com.hazelcast.spring.cache.HazelcastCache, is available from the following locations:该方法的 class、com.hazelcast.spring.cache.HazelcastCache 可从以下位置获得:

jar:file:<path>/.m2/repository/com/hazelcast/hazelcast-all/4.1/hazelcast-all-4.1.jar!/com/hazelcast/spring/cache/HazelcastCache.class

It was loaded from the following location:它是从以下位置加载的:

file:<path>/.m2/repository/com/hazelcast/hazelcast-all/4.1/hazelcast-all-4.1.jar

Action:行动:

Correct the classpath of your application so that it contains a single, compatible version of com.hazelcast.spring.cache.HazelcastCache更正应用程序的类路径,使其包含单个兼容版本的 com.hazelcast.spring.cache.HazelcastCache

We checked for IMap class - package: com.hazelcast.map.IMap我们检查了 IMap class - package:com.hazelcast.Z1D78DC8ED512144018B511FE2E5018BIMap114

any solution/suggestion on this issue关于这个问题的任何解决方案/建议

Trying to see if the following compatibility works.尝试查看以下兼容性是否有效。 Just looking at https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator-autoconfigure/2.1.9.RELEASE , the HazelCast version is 3.11.4. 只看 https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator-autoconfigure/2.1.9.RELEASE ,HazelCast 版本是 3.11.4。 Can you change the version of hazelcast from 4.1 to 3.11.4 (on the POM) and try it again.您能否将 hazelcast 的版本从 4.1 更改为 3.11.4(在 POM 上)并再试一次。

<dependency>
    <groupId>com.hazelcast</groupId>
    <artifactId>hazelcast-all</artifactId>
    <version>3.11.4</version>
</dependency>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM