Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 13DED109B0 for ; Wed, 5 Mar 2014 06:09:29 +0000 (UTC) Received: (qmail 61262 invoked by uid 500); 5 Mar 2014 06:09:27 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 60580 invoked by uid 500); 5 Mar 2014 06:09:14 -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 60571 invoked by uid 99); 5 Mar 2014 06:09:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2014 06:09:11 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of asiddaiah@altimetrik.com does not designate 216.139.250.139 as permitted sender) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2014 06:09:07 +0000 Received: from [192.168.236.139] (helo=joe.nabble.com) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WL508-0002pL-No for users@jackrabbit.apache.org; Tue, 04 Mar 2014 22:08:21 -0800 Date: Tue, 4 Mar 2014 22:08:05 -0800 (PST) From: AshokBS To: users@jackrabbit.apache.org Message-ID: <1393999685709-4660417.post@n4.nabble.com> In-Reply-To: References: <1393927710467-4660409.post@n4.nabble.com> Subject: Re: AW: How to create users using jackrabbit? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Malzer, Thanks for your response. I have seen some differences while doing this activity of creating users. Scenario1: I try to use TransientRepository and then login with admin credentials and go ahead to create users, it is working fine. But the fact is i am unable to login to the repository URL say something like: http://localhost:9090/repository/default/ The code was something like this to create testuser: Repository repository = new TransientRepository(); Session session = repository.login(new SimpleCredentials("admin", "admin".toCharArray())); final UserManager userManager = ((JackrabbitSession) session).getUserManager(); final User user2 = userManager.createUser("testuser", "testuser"); session.save(); Why iam unable to login with testuser to the above URL? I mean where have we mapping testuser to the above URL in this code. Scenario2: I try to use JCRUtils API to get repository which is running and try to login say something like this: Repository repository = JcrUtils.getRepository("http://localhost:9090/server"); Session session = repository.login(new SimpleCredentials("admin", "admin".toCharArray())); UserManager um = ((JackrabbitSession) session).getUserManager(); User user = um.createUser("testuser", "testuser"); The above one will not allow me to create users as said earlier and give the exception as: java.lang.ClassCastException: org.apache.jackrabbit.jcr2spi.SessionImpl cannot be cast to org.apache.jackrabbit.api.JackrabbitSession Why is this happening? My queston is from scenario 1: where does the users data reside and how to login to web browser to URL? Is it not possible to use those created users for login? -- View this message in context: http://jackrabbit.510166.n4.nabble.com/How-to-create-users-using-jackrabbit-tp4660409p4660417.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.