由于Serializer覆盖,Hazelcast实例在启动时失败

时间:2016-06-24 11:35:18

标签: java hazelcast

我正在运行hazelcast 3.6.3,当我运行以下时没有配置:

Hazelcast.newHazelcastInstance();

我得到如下例外:

java.lang.IllegalArgumentException: [class java.util.LinkedList] serializer cannot be overridden!
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.safeRegister(AbstractSerializationService.java:331)
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.safeRegister(AbstractSerializationService.java:326)
at com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder.registerSerializerHooks(DefaultSerializationServiceBuilder.java:294)
at com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder.build(DefaultSerializationServiceBuilder.java:220)
at com.hazelcast.instance.DefaultNodeExtension.createSerializationService(DefaultNodeExtension.java:125)
at com.hazelcast.instance.Node.<init>(Node.java:174)
at com.hazelcast.instance.HazelcastInstanceImpl.<init>(HazelcastInstanceImpl.java:125)
at com.hazelcast.instance.HazelcastInstanceFactory.constructHazelcastInstance(HazelcastInstanceFactory.java:160)
at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:143)
at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:111)
at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:87)
...

我没有注册任何序列化程序,当我降级到3.5.3时,同样的代码也能正常工作。我是否需要做任何改变配置的事情?

1 个答案:

答案 0 :(得分:0)

noctarius是对的。这是由Spring Boot打包jar中的两个版本的hazelcast.jar文件引起的。