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

session object is null, but not always. #100

Open
angad-rajput-qp opened this issue May 25, 2021 · 0 comments
Open

session object is null, but not always. #100

angad-rajput-qp opened this issue May 25, 2021 · 0 comments

Comments

@angad-rajput-qp
Copy link

angad-rajput-qp commented May 25, 2021

I am using resin as a web server and hazelcast-wm 4.0 and hazelcast 4.0
I receive a NullPointerException on the session object. The error does not reappear after we refresh.
The session object is randomly null for the first time.

Code in a JSP:

user = (User) session.getAttribute("user");

Error:

java.lang.NullPointerException
                                                       	at _jsp._jsp._user._socialNetworksites__jsp._jspService(_socialNetworksites__jsp.java:1444)
                                                       	at _jsp._jsp._user._socialNetworksites__jsp._jspService(_socialNetworksites__jsp.java:1393)
                                                       	at com.caucho.jsp.JavaPage.service(JavaPage.java:64)
                                                       	at com.caucho.jsp.Page.pageservice(Page.java:548)
                                                       	at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:194)
                                                       	at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:305)
                                                       	at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89)
                                                       	at com.caucho.server.httpcache.ProxyCacheFilterChain.doFilter(ProxyCacheFilterChain.java:161)
                                                       	at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:131)
                                                       	at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:314)
                                                       	at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:440)
                                                       	at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:359)
                                                       	at com.hazelcast.web.WebFilter$HazelcastRequestWrapper$1.include(WebFilter.java:370)
                                                       	at com.hazelcast.web.WebFilter$HazelcastRequestWrapper$1.include(WebFilter.java:370)
                                                       	at com.hazelcast.web.WebFilter$HazelcastRequestWrapper$1.include(WebFilter.java:370)
                                                       	at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:1091)
                                                       	at _jsp._jsp._user._qp_22dlogin__jsp._jspService(_qp_22dlogin__jsp.java:1609)
                                                       	at _jsp._jsp._user._qp_22dlogin__jsp._jspService(_qp_22dlogin__jsp.java:1394)

the session is null in the above case.

--EDIT--

I tried fetching "request.getSession(true)" and it gave me null randomly.

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

1 participant