-
Notifications
You must be signed in to change notification settings - Fork 37
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
ClassNotFoundException when deserializing session #55
Comments
Hi @anton-johansson , Can you please try to deploy hazelcast cluster into your k8s cluster and switch to client-server mode to see if you are experiencing any problem. You can simply install hazelcast via hazelcast helm chart If you don't see any issue then we probably need to set |
Hi! Sorry I left that information out. I'm using P2P. Hazelcast is running within the application itself. Would it be any different using Client/Server? I'm sure the deserialization process is the same either way? Hm, how do I set the |
Hmm, that's interesting. I'll see if I can fix the issue and maybe submit a pull request. |
I've started working on a PR, see above. However, I'm having some issues. Care to take a look? |
We also experienced this issue and solved it with #33, i.e. we initialize an own instance in a @anton-johansson You mentioned in #56 your solution does not work. I am not quite familiar of the lifecycle events in Tomcat but to me it looks like P2PLifecycleListener may be called before you are able to configure the classloader in When looking at ClientServerLifecycleListener and comparing it to P2PLifecycleListener I noticed the latter one creates an instance of Hazelcast while the first one just initializes the |
Moved the initialization of the Hazelcast member instance in P2P mode to the startup of `HazelcastSessionManager` in order to access the context classloader
When will this fix be in the next release? v1.14, I built a snapshot from master and it fixed my issue! |
I'm running Tomcat 8 within a container in a Kubernetes cluster.
Under
/usr/local/tomcat/lib/
I have the following (other than the standard JARs):hazelcast-3.11.1.jar
hazelcast-kubernetes-1.3.1.jar
hazelcast-tomcat8-sessionmanager-1.1.3.jar
Under
/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/
I have the dependencies of my webapp.I'm using NGINX Ingress Controller for Kubernetes with Sticky sessions enabled. To simulate a failover, I'm removing my
INGRESSCOOKIE
. This gives me a new backend, and the session manager notices it and tries to fetch the session on the new backend. I get the following logs:It does look like an incorrect class loader is being used. The session manager exists in the generic Tomcat class loader and the classes that is put into the session exists in the webapp class loader. Pure guesses, but how do I make sure that the correct class loader is being used?
The text was updated successfully, but these errors were encountered: