#Apache Shiro #GlassFish

Apache Shiro NullPointerException after Logout on GlassFish 4.1

I’m currently working on a web application on Java EE7 stack and I’ve integrated Apache Shiro with CAS for security. Everything goes well, except the GlassFish 4.1 (build 13) server logs keep getting filled with following errors when calling logout() method: Info: Session event listener threw exception java.lang.NullPointerException at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:65) at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:57) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:910) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:854) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:842) at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1603) at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:204) at org.apache.shiro.web.session.HttpServletSession.stop(HttpServletSession.java:113) at org.apache.shiro.session.ProxiedSession.stop(ProxiedSession.java:107) at org.apache.shiro.subject.support.DelegatingSubject$StoppingAwareProxiedSession.stop(DelegatingSubject.java:419) at org. ...

Author 3 min
#Apache Shiro #SSO #CAS #LDAP

Integrating Apache Shiro with CAS Authentication via LDAP

In this post I want to share how to setup SSO with CAS and LDAP authentication, and then demonstrate how to integrate Apache Shiro with CAS in the web application. An Example of An Individual LDAP Entry The following entry which represented in LDIF would be used to login the CAS. In this case, the username will be the full email address (case-insensitive) and the password is the value of userPassword attribute. ...

Author 5 min