我正在Spring Boot v.2.0.3.RELEASE上运行hazelcast-jet-spring工件(不是hazelcast-jet)v.0.6.1,并收到此错误:
Caused by: java.lang.IllegalArgumentException: DataSerializableFactory[-45] is already registered! com.hazelcast.internal.journal.EventJournalDataSerializerHook$1@4a3e1b5d -> com.hazelcast.journal.EventJournalDataSerializerHook$1@587df3e4
at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.register(DataSerializableSerializer.java:90)
at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.<init>(DataSerializableSerializer.java:69)
at com.hazelcast.internal.serialization.impl.SerializationServiceV1.<init>(SerializationServiceV1.java:103)
at com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder.createSerializationService(DefaultSerializationServiceBuilder.java:275)
at com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder.build(DefaultSerializationServiceBuilder.java:228)
at com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder.build(DefaultSerializationServiceBuilder.java:52)
at com.hazelcast.instance.DefaultNodeExtension.createSerializationService(DefaultNodeExtension.java:200)
at com.hazelcast.instance.Node.<init>(Node.java:209)
at com.hazelcast.instance.HazelcastInstanceImpl.createNode(HazelcastInstanceImpl.java:164)
at com.hazelcast.instance.HazelcastInstanceImpl.<init>(HazelcastInstanceImpl.java:132)
at com.hazelcast.instance.HazelcastInstanceFactory.constructHazelcastInstance(HazelcastInstanceFactory.java:196)
at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:175)
at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:125)
at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:57)
at com.hazelcast.jet.Jet.newJetInstance(Jet.java:57)
com.hazelcast.internal.journal.EventJournalDataSerializerHook com.hazelcast.journal.EventJournalDataSerializerHook
看起来两个名称相同但位于不同程序包中的类处于冲突状态。您能建议如何避免这种情况吗?
谢谢!
答案 0 :(得分:1)
我不得不对Hazelcast 3.10使用显式依赖。
解决了!