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

NoClassDefFoundError com/hazelcast/web/entryprocessor/SessionUpdateEntryProcessor #85

Open
me90 opened this issue Apr 1, 2020 · 5 comments

Comments

@me90
Copy link

me90 commented Apr 1, 2020

I'm trying to create a cluster using hazelcast filter based web session replication.
The replication seems work fine but i get for every operation the following exception.

I'm use hazelcast-4.0.jar and hazelcast-wm-4.0.jar into a preexistent Webapplication deployed on Apache Tomcat/9.0.30 with JSF Mojarra 2.2.8, PrimeFaces 6.2, Spring 4.

[http-nio-18080-exec-1] com.hazelcast.web.HazelcastHttpSession.null Unexpected error occurred.
        com.hazelcast.client.UndefinedErrorCodeException: Class name: java.lang.NoClassDefFoundError, Message: com/hazelcast/web/entryprocessor/SessionUpdateEntryProcessor
                at com.hazelcast.web.WebDataSerializerHook.getIdentifiedDataSerializable(WebDataSerializerHook.java:79)
                at com.hazelcast.web.WebDataSerializerHook.access$000(WebDataSerializerHook.java:33)
                at com.hazelcast.web.WebDataSerializerHook$1.create(WebDataSerializerHook.java:70)
                at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.readInternal(DataSerializableSerializer.java:143)
                at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:106)
                at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:51)
                at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48)
                at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:187)
                at com.hazelcast.client.impl.protocol.task.map.MapExecuteOnKeyMessageTask.prepareOperation(MapExecuteOnKeyMessageTask.java:42)
                at com.hazelcast.client.impl.protocol.task.AbstractPartitionMessageTask.processInternal(AbstractPartitionMessageTask.java:45)
                at com.hazelcast.client.impl.protocol.task.AbstractAsyncMessageTask.processMessage(AbstractAsyncMessageTask.java:71)
                at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.initializeAndProcessMessage(AbstractMessageTask.java:145)
                at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.run(AbstractMessageTask.java:108)
                at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:181)
                at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:172)
                at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:140)
                at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:123)
@enozcan
Copy link
Contributor

enozcan commented Apr 1, 2020

Hi @me90,
Can you please share the WebFilter config used in web.xml as well? (The config where you set map name, cookie name, sticky session etc.)

@me90
Copy link
Author

me90 commented Apr 1, 2020

Hi @enozcan,
thanks for the quick reply.
My web.xml is the following

web.xml.txt

@enozcan
Copy link
Contributor

enozcan commented Apr 3, 2020

@me90 I will try to reproduce your case end examine the failure asap. In meantime, can you please share if there is any error/warn log on the server side regarding the exception above?

@me90
Copy link
Author

me90 commented Apr 3, 2020

@me90 I will try to reproduce your case end examine the failure asap. In meantime, can you please share if there is any error/warn log on the server side regarding the exception above?

No, no errors or warnings on the Hazelcast server logs

INFORMAZIONI: [172.17.0.1]:5701 [dev] [4.0] processors=1, physical.memory.total=7,8G, physical.memory.free=124,9M, swap.space.total=11,9G, swap.space.free=11,5G, heap.memory.used=149,4M, heap.memory.free=840,6M, heap.memory.total=990,0M, heap.memory.max=1,9G, heap.memory.used/total=15,09%, heap.memory.used/max=7,74%, minor.gc.count=0, minor.gc.time=0ms, major.gc.count=1, major.gc.time=97ms, load.process=0,00%, load.system=0,00%, load.systemAverage=2,87, thread.count=41, thread.peakCount=42, cluster.timeDiff=0, event.q.size=0, executor.q.async.size=0, executor.q.client.size=0, executor.q.client.query.size=0, executor.q.client.blocking.size=0, executor.q.query.size=0, executor.q.scheduled.size=0, executor.q.io.size=0, executor.q.system.size=0, executor.q.operations.size=0, executor.q.priorityOperation.size=0, operations.completed.count=2, executor.q.mapLoad.size=0, executor.q.mapLoadAllKeys.size=0, executor.q.cluster.size=0, executor.q.response.size=0, operations.running.count=0, operations.pending.invocations.percentage=0,00%, operations.pending.invocations.count=0, proxy.count=1, clientEndpoint.count=1, connection.active.count=1, client.connection.count=1, connection.count=0
apr 03, 2020 9:42:57 PM com.hazelcast.internal.partition.impl.PartitionStateManager
INFORMAZIONI: [172.17.0.1]:5701 [dev] [4.0] Initializing cluster partition table arrangement...
apr 03, 2020 9:43:16 PM com.hazelcast.internal.diagnostics.HealthMonitor
INFORMAZIONI: [172.17.0.1]:5701 [dev] [4.0] processors=1, physical.memory.total=7,8G, physical.memory.free=130,3M, swap.space.total=11,9G, swap.space.free=11,5G, heap.memory.used=154,8M, heap.memory.free=835,2M, heap.memory.total=990,0M, heap.memory.max=1,9G, heap.memory.used/total=15,64%, heap.memory.used/max=8,03%, minor.gc.count=0, minor.gc.time=0ms, major.gc.count=1, major.gc.time=97ms, load.process=0,00%, load.system=0,00%, load.systemAverage=3,69, thread.count=41, thread.peakCount=42, cluster.timeDiff=0, event.q.size=0, executor.q.async.size=0, executor.q.client.size=0, executor.q.client.query.size=0, executor.q.client.blocking.size=0, executor.q.query.size=0, executor.q.scheduled.size=0, executor.q.io.size=0, executor.q.system.size=0, executor.q.operations.size=0, executor.q.priorityOperation.size=0, operations.completed.count=54, executor.q.mapLoad.size=0, executor.q.mapLoadAllKeys.size=0, executor.q.cluster.size=0, executor.q.response.size=0, operations.running.count=0, operations.pending.invocations.percentage=0,00%, operations.pending.invocations.count=0, proxy.count=1, clientEndpoint.count=1, connection.active.count=1, client.connection.count=1, connection.count=0
apr 03, 2020 9:43:36 PM com.hazelcast.internal.diagnostics.HealthMonitor
INFORMAZIONI: [172.17.0.1]:5701 [dev] [4.0] processors=1, physical.memory.total=7,8G, physical.memory.free=144,3M, swap.space.total=11,9G, swap.space.free=11,5G, heap.memory.used=154,8M, heap.memory.free=835,2M, heap.memory.total=990,0M, heap.memory.max=1,9G, heap.memory.used/total=15,64%, heap.memory.used/max=8,03%, minor.gc.count=0, minor.gc.time=0ms, major.gc.count=1, major.gc.time=97ms, load.process=0,00%, load.system=0,00%, load.systemAverage=3,64, thread.count=40, thread.peakCount=42, cluster.timeDiff=0, event.q.size=0, executor.q.async.size=0, executor.q.client.size=0, executor.q.client.query.size=0, executor.q.client.blocking.size=0, executor.q.query.size=0, executor.q.scheduled.size=0, executor.q.io.size=0, executor.q.system.size=0, executor.q.operations.size=0, executor.q.priorityOperation.size=0, operations.completed.count=96, executor.q.mapLoad.size=0, executor.q.mapLoadAllKeys.size=0, executor.q.cluster.size=0, executor.q.response.size=0, operations.running.count=0, operations.pending.invocations.percentage=0,00%, operations.pending.invocations.count=0, proxy.count=1, clientEndpoint.count=1, connection.active.count=1, client.connection.count=1, connection.count=0

tomcat logs

AVVERTENZA [http-nio-18080-exec-6] com.hazelcast.web.HazelcastHttpSession.null Unexpected error occurred.
        com.hazelcast.client.UndefinedErrorCodeException: Class name: java.lang.NoClassDefFoundError, Message: com/hazelcast/web/entryprocessor/SessionUpdateEntryProcessor
                at com.hazelcast.web.WebDataSerializerHook.getIdentifiedDataSerializable(WebDataSerializerHook.java:79)
                at com.hazelcast.web.WebDataSerializerHook.access$000(WebDataSerializerHook.java:33)
                at com.hazelcast.web.WebDataSerializerHook$1.create(WebDataSerializerHook.java:70)
                at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.readInternal(DataSerializableSerializer.java:143)
                at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:106)
                at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:51)
                at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48)
                at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:187)
                at com.hazelcast.client.impl.protocol.task.map.MapExecuteOnKeyMessageTask.prepareOperation(MapExecuteOnKeyMessageTask.java:42)
                at com.hazelcast.client.impl.protocol.task.AbstractPartitionMessageTask.processInternal(AbstractPartitionMessageTask.java:45)
                at com.hazelcast.client.impl.protocol.task.AbstractAsyncMessageTask.processMessage(AbstractAsyncMessageTask.java:71)
                at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.initializeAndProcessMessage(AbstractMessageTask.java:145)
                at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.run(AbstractMessageTask.java:108)
                at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:181)
                at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:172)
                at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:140)
                at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:123)
03-Apr-2020 21:43:26.806 AVVERTENZA [http-nio-18080-exec-6] com.hazelcast.web.HazelcastHttpSession.null Unexpected error occurred.
        com.hazelcast.client.UndefinedErrorCodeException: Class name: java.lang.NoClassDefFoundError, Message: com/hazelcast/web/entryprocessor/SessionUpdateEntryProcessor
                at com.hazelcast.web.WebDataSerializerHook.getIdentifiedDataSerializable(WebDataSerializerHook.java:79)
                at com.hazelcast.web.WebDataSerializerHook.access$000(WebDataSerializerHook.java:33)
                at com.hazelcast.web.WebDataSerializerHook$1.create(WebDataSerializerHook.java:70)
                at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.readInternal(DataSerializableSerializer.java:143)
                at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:106)
                at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:51)
                at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48)
                at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:187)
                at com.hazelcast.client.impl.protocol.task.map.MapExecuteOnKeyMessageTask.prepareOperation(MapExecuteOnKeyMessageTask.java:42)
                at com.hazelcast.client.impl.protocol.task.AbstractPartitionMessageTask.processInternal(AbstractPartitionMessageTask.java:45)
                at com.hazelcast.client.impl.protocol.task.AbstractAsyncMessageTask.processMessage(AbstractAsyncMessageTask.java:71)
                at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.initializeAndProcessMessage(AbstractMessageTask.java:145)
                at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.run(AbstractMessageTask.java:108)
                at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:181)
                at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:172)
                at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:140)
                at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:123)

@enozcan
Copy link
Contributor

enozcan commented Apr 9, 2020

Hi @me90,

I've tested both WM 4.x and 3.x versions with Tomcat-9.0.33 (not with Spring and I don't think it could be the cause) and haven't seen something weird or a log like the above ones. You say the replication works fine despite the seen errors and this is actually interesting. The only thing that I noticed is in the web.xml. Hazelcast Web Filter should be at the top of other filters in order to work properly. I'm not 100% sure if this is the actual cause of the problem but you may give it a try.

Also, what about the attribute values you set for sessions? Could you please also share the details of them so may be we can derive a conclusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants