hazelcast / hazelcast-tomcat-sessionmanager

Tomcat Based Web Session Replication
Other
33 stars 37 forks source link

Unable to deserialize session after adding CrawlerSessionManagerValve valve into server.xml #78

Open Spentas opened 4 years ago

Spentas commented 4 years ago

It works fine before adding CrawlerSessionManager

 com.hazelcast.session.HazelcastSession.deserializeMap Unable to deserialize object in session
 com.hazelcast.nio.serialization.HazelcastSerializationException: There is no suitable de-serializer for type 1633907817. 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:238)
        at com.hazelcast.internal.serialization.impl.AbstractSerializationService.readObject(AbstractSerializationService.java:265)
        at com.hazelcast.internal.serialization.impl.ByteArrayObjectDataInput.readObject(ByteArrayObjectDataInput.java:574)
        at com.hazelcast.session.HazelcastSession.deserializeMap(HazelcastSession.java:171)
        at com.hazelcast.session.HazelcastSession.readData(HazelcastSession.java:158)
        at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.readInternal(DataSerializableSerializer.java:160)
        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.spi.ClientProxy.toObject(ClientProxy.java:102)
        at com.hazelcast.client.proxy.ClientMapProxy.get(ClientMapProxy.java:318)
        at com.hazelcast.session.HazelcastSessionManager.findSession(HazelcastSessionManager.java:182)
        at org.apache.catalina.connector.Request.doGetSession(Request.java:2977)
        at org.apache.catalina.connector.Request.getSession(Request.java:2434)
        at org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(CrawlerSessionManagerValve.java:162)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
alparslanavci commented 4 years ago

Hi @Spentas, this exception is thrown when your session object is not configured correctly for serialization on both Hazelcast server and client side. Can you please elaborate more on your case? Was it working fine and then started throwing this exception after some change?

Spentas commented 4 years ago

Hi @Spentas, this exception is thrown when your session object is not configured correctly for serialization on both Hazelcast server and client side. Can you please elaborate more on your case? Was it working fine and then started throwing this exception after some change?

it works if I remove the CrawlerSessionManager , the session is serializable

alparslanavci commented 4 years ago

@Spentas I couldn't reproduce your issue on my local. Could you please provide a reproducer case?