Recently i started migrating from java8 to Java 17 and SpringBoot-2.7.2 to Springboot-3.1.5 .In my project i am using Hazelcast as well and i moved to latest release of Hazelcast-all version [5.0-BETA-1][1]
but this is creating a issue in the following java code
import jakarta.servlet.http.HttpSession;
import com.hazelcast.web.HazelcastHttpSession;
HttpSession oldSession = request.getSession();
oldSession.invalidate();
//creating new session
HttpSession session = request.getSession(true);
if (session instanceof HazelcastHttpSession) {
sessionService.setSessions(session.getId(), new Session(session.getId(), new Date(), username));
}
While in eclipse class showing error at top line of class
- The type javax.servlet.http.HttpSession cannot be resolved. It is indirectly referenced from required type com.hazelcast.web.HazelcastHttpSession
- The type javax.servlet.http.HttpSession cannot be resolved. It is indirectly referenced from required type com.hazelcast.web.WebFilter
We cant use Hazelcast-all latest version with Springboot ? Look like Hazelcast-all still using javax.*
in place of jakarta.*
[1]: https://mvnrepository.com/artifact/com.hazelcast/hazelcast-all/5.0-BETA-1