James McShane
James McShane

Reputation: 789

Hazelcast Instance failing on startup due to Serializer overwrite

I am running hazelcast 3.6.3 and when I run the following with no config:

Hazelcast.newHazelcastInstance();

I get an exception as follows:

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)
...

I have not registered any serializers and this same code works when I downgrade to 3.5.3. Do I need to do anything to change the configuration?

Upvotes: 1

Views: 2277

Answers (1)

James McShane
James McShane

Reputation: 789

noctarius was correct. This was caused by two versions of the hazelcast.jar file within the Spring Boot packaged jar.

Upvotes: 1

Related Questions