jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yusuf Aaji <yusuf.a...@gmail.com>
Subject Unable to cast to jackrabbitSession to get the UserManager
Date Fri, 21 Jan 2011 21:13:46 GMT
Hi,

When I try to cast the Session object to JackrabbitSession to get the
UserManager I'm getting a classCastException

 #{accessManager.addUser}: java.lang.ClassCastException:
org.apache.jackrabbit.core.XASessionImpl cannot be cast to
org.apache.jackrabbit.api.JackrabbitSession
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

and this is how I'm getting my session:

ServletContext context = (ServletContext)
FacesContext.getCurrentInstance().getExternalContext().getContext();
ServletContext jackrabbit = context.getContext("/jackrabbit");
Repository repository = (Repository)
jackrabbit.getAttribute(Repository.class.getName());
contentSession = repository.login( jcrCredentials );


any ideas? isn't XASessionImpl implement JackrabbitSession interface?!!!

BR,
Yusuf

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message