Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 28841 invoked from network); 21 Jan 2011 21:14:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jan 2011 21:14:37 -0000 Received: (qmail 63133 invoked by uid 500); 21 Jan 2011 21:14:37 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 63083 invoked by uid 500); 21 Jan 2011 21:14:36 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 63075 invoked by uid 99); 21 Jan 2011 21:14:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 21:14:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yusuf.aaji@gmail.com designates 209.85.216.42 as permitted sender) Received: from [209.85.216.42] (HELO mail-qw0-f42.google.com) (209.85.216.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 21:14:28 +0000 Received: by qwj8 with SMTP id 8so2148308qwj.1 for ; Fri, 21 Jan 2011 13:14:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=UBXS91pl58TkT9Fi7e3YFHkZ8JGuAm+39aJ7oE/V1A4=; b=xGq6ZdynM/anTKxXmLJVxDVXjmiBXYXqAyOKM3q7ijMYRHRWcmG1phwEZAHJ8uP5IG Qs4MAzKoJMvhVq0gdVow8r5pvVtO78RUZfp0grlOuYqeKjYcTo8quT647NMMTNG0qjxv 9NflcsRfzaJ8adz2+i2OUMFXnozt2n2XYgEPQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=lBQaFhdvRBPFLw9TZIGGvvwUHjRe/KylmKXupoEP4iA9mQznfYliqGRDDZOie03qjZ iCYXzfcvDRTwu+GIY/WENzWNFGmrNUZ5gBWzmOmvJOOTen51B+Fk+NZh2MfjeiVg1gix FqDxv3Red1cjunHnZqDe60uiSUiHq21HP32dg= Received: by 10.229.98.193 with SMTP id r1mr981380qcn.22.1295644447062; Fri, 21 Jan 2011 13:14:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.112.25 with HTTP; Fri, 21 Jan 2011 13:13:46 -0800 (PST) From: Yusuf Aaji Date: Sat, 22 Jan 2011 00:13:46 +0300 Message-ID: Subject: Unable to cast to jackrabbitSession to get the UserManager To: users@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=0016364eee1805bd70049a61bb1b X-Virus-Checked: Checked by ClamAV on apache.org --0016364eee1805bd70049a61bb1b Content-Type: text/plain; charset=UTF-8 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 --0016364eee1805bd70049a61bb1b--