0

我在 Spring Boot v.2.0.3.RELEASE 上运行 hazelcast-jet-spring artifact (not 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

看起来 2 个同名但位于不同包中的类处于冲突状态。您能否建议如何避免这种情况?

谢谢!

4

1 回答 1

1

I had to use an explicit dependency to Hazelcast 3.10.

Solved!

于 2018-07-24T13:46:04.317 回答