GWT : NULL Session

Posted by jidma on Stack Overflow See other posts from Stack Overflow or by jidma
Published on 2012-10-31T22:58:49Z Indexed on 2012/10/31 23:00 UTC
Read the original article Hit count: 168

Filed under:
|
|

I'm using spring4gwt in my project.

I have the following login service implementation:

@Service("loginService")
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {

    @Override
    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public UserBean checkUser(String userName, String password) throws Exception {

        HttpSession httpSession = getThreadLocalRequest().getSession();

    }
}

When i call the loginService.checkUser("test","test") (In hosted mode), I get a null pointer exception, as getThreadLocalRequest() returns NULL instead of the actual session.

I didn't try in web mode yet.

Why would I get a null session ? Does it have something to do with spring4gwt ?

Thank you

© Stack Overflow or respective owner

Related posts about spring

Related posts about session