Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on server when attempting to deserialize HIBERNATE4_TYPE_HIBERNATE_CACHE_ENTRY value. #6683

Closed
rufrancis opened this issue Nov 6, 2015 · 4 comments

Comments

Projects
None yet
5 participants
@rufrancis
Copy link

commented Nov 6, 2015

This exception is raised on the server when attempting to deserialize a hibernate cache entry when the server is being used as a hibernate 2nd level cache.

SEVERE: [127.0.0.1]:5701 [dev-cache] [3.6-EA] There is no suitable de-serializer for type -203. This exception is likely to be caused by differences in the serialization configuration between members or between clients and members.
com.hazelcast.nio.serialization.HazelcastSerializationException: There is no suitable de-serializer for type -203. This exception is likely to be caused by differences in the serialization configuration between members or between clients and members.
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.newHazelcastSerializationException(AbstractSerializationService.java:173)
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.readObject(AbstractSerializationService.java:200)
at com.hazelcast.internal.serialization.impl.ByteArrayObjectDataInput.readObject(ByteArrayObjectDataInput.java:600)
at com.hazelcast.hibernate.serialization.Value.readData(Value.java:78)
at com.hazelcast.internal.serialization.impl.DataSerializer.read(DataSerializer.java:121)
at com.hazelcast.internal.serialization.impl.DataSerializer.read(DataSerializer.java:47)
at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:46)
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:160)
at com.hazelcast.map.impl.LazyMapEntry.getValue(LazyMapEntry.java:99)
at com.hazelcast.hibernate.distributed.LockEntryProcessor.process(LockEntryProcessor.java:49)
at com.hazelcast.hibernate.distributed.LockEntryProcessor.process(LockEntryProcessor.java:32)
at com.hazelcast.map.impl.operation.EntryOperation.process(EntryOperation.java:222)
at com.hazelcast.map.impl.operation.EntryOperation.run(EntryOperation.java:85)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:167)
at com.hazelcast.spi.impl.operationexecutor.classic.ClassicOperationExecutor.runOnCallingThread(ClassicOperationExecutor.java:380)
at com.hazelcast.spi.impl.operationexecutor.classic.ClassicOperationExecutor.runOnCallingThreadIfPossible(ClassicOperationExecutor.java:340)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvokeLocal(Invocation.java:259)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvoke(Invocation.java:243)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.invokeInternal(Invocation.java:210)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke(Invocation.java:180)
at com.hazelcast.spi.impl.operationservice.impl.InvocationBuilderImpl.invoke(InvocationBuilderImpl.java:46)
at com.hazelcast.client.impl.protocol.task.AbstractPartitionMessageTask.processMessage(AbstractPartitionMessageTask.java:65)
at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.initializeAndProcessMessage(AbstractMessageTask.java:120)
at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.run(AbstractMessageTask.java:100)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:124)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.processPartitionSpecificRunnable(OperationThread.java:159)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.process(OperationThread.java:142)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.doRun(OperationThread.java:124)
at com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.run(OperationThread.java:99)

@kobalski kobalski added this to the 3.6 milestone Nov 6, 2015

@kobalski kobalski self-assigned this Nov 6, 2015

@mesutcelik mesutcelik modified the milestones: 3.7, 3.6 Nov 9, 2015

@rufrancis

This comment has been minimized.

Copy link
Author

commented Nov 9, 2015

Are there any suggestions or work-arounds for this defect? We were unable to use hazelcast as a 2nd-level cache provider for hibernate with the 3.5 branch due to #4406 and this looks like it will unfortunately keep the trend going in the 3.6 branch.

@rufrancis

This comment has been minimized.

Copy link
Author

commented Nov 12, 2015

After investigating this more, I have more information about the issue and solutions to make get it to work using 3.6-EA.

Background Information:

Using the com.hazelcast.hibernate.HazelcastCacheRegionFactory
Hibernate Version: 4.2.3.Final

Work Around:

  • During bootstrap of the server process the code looks for org.hibernate.cache.spi.entry.CacheEntry on the classpath in order to detect hibernate and load serializers for it. hibernate-core-${hibernate.version}.jar needs to be added to the lib/ directory on the hazelcast server and the "export CLASSPATH=" statement in server.sh should be updated to include the hibernate-core.jar file on the classpath.
  • Additionally the hazelcast-all-3.6-EA.jar file does not include the classes from the hazelcast-hibernate4-3.6-EA.jar making it unlikely that hibernate4 will work out of the box with hazelcast. To work around this issue modify server.sh CLASSPATH declaration to be as follows

export CLASSPATH=$HAZELCAST_HOME/lib/hazelcast-3.6-EA.jar:$HAZELCAST_HOME/lib/hazelcast-wm-3.6-EA.jar:$HAZELCAST_HOME/lib/hazelcast-spring-3.6-EA.jar:$HAZELCAST_HOME/lib/hazelcast-jclouds-3.6-EA.jar:$HAZELCAST_HOME/lib/hazelcast-jca-3.6-EA.jar:$HAZELCAST_HOME/lib/hazelcast-hibernate4-3.6-EA.jar:$HAZELCAST_HOME/lib/hazelcast-cloud-3.6-EA.jar

@kobalski kobalski modified the milestones: 3.6, 3.7 Dec 7, 2015

@mesutcelik mesutcelik modified the milestones: 3.6, 3.6.1 Dec 10, 2015

@enesakar enesakar modified the milestones: 3.6.1, 3.6.2 Feb 26, 2016

@enesakar

This comment has been minimized.

Copy link
Member

commented Mar 17, 2016

the problem will be gone when hazelcast-all uses hibernate4 jars by default.
till then the workaround above can be used (thanks @rufrancis for sharing the workaround).

@enesakar enesakar closed this Mar 17, 2016

@josebarrueta

This comment has been minimized.

Copy link

commented Jul 16, 2016

@enesakar I'm seeing this issue running Hazelcast v3.6.4 and Hibernate4, is this expected? Is the workaround still necessary?

Unhandled exception occurred: There is no suitable de-serializer for type -203. This exception is likely to be caused by differences in the serialization configuration between members or between clients and members.","stack_trace":"com.hazelcast.nio.serialization.HazelcastSerializationException: There is no suitable de-serializer for type -203. This exception is likely to be caused by differences in the serialization configuration between members or between clients and members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.