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 34D27C5AB for ; Wed, 2 May 2012 14:13:52 +0000 (UTC) Received: (qmail 64721 invoked by uid 500); 2 May 2012 14:13:51 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 64640 invoked by uid 500); 2 May 2012 14:13:50 -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 64631 invoked by uid 99); 2 May 2012 14:13:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 14:13:50 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Ferdinand.Malzer@s-itsolutions.at designates 213.150.10.1 as permitted sender) Received: from [213.150.10.1] (HELO smxsat1.smxs.net) (213.150.10.1) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 14:13:44 +0000 Received: from m01x1.s-mxs.net ([10.3.55.201]) by smxsat1.smxs.net over TLS secured channel (TLSv1/SSLv3:AES256-SHA:256) with XWall v3.47i. ; Wed, 2 May 2012 16:13:21 +0200 Received: from m0106.s-mxs.net ([10.3.55.6]) by m01x1.s-mxs.net over TLS secured channel (TLSv1/SSLv3:AES128-SHA:128) with XWall v3.47i. ; Wed, 2 May 2012 16:13:21 +0200 Received: from M0182.s-mxs.net ([fe80::75f4:618d:f52c:d9af]) by m0106.s-mxs.net ([fe80::19fd:3ed:7b2f:a92a%11]) with mapi id 14.01.0355.002; Wed, 2 May 2012 16:13:20 +0200 From: Malzer Ferdinand OSP sIT To: "users@jackrabbit.apache.org" Subject: problem after registering a custom privilege Thread-Topic: problem after registering a custom privilege Thread-Index: Ac0obNeoE2IdJcjOQ/aZbCPlzA3j1A== Date: Wed, 2 May 2012 14:13:19 +0000 Message-ID: Accept-Language: en-US, de-AT Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-XWALL-BCKS: auto X-Virus-Checked: Checked by ClamAV on apache.org Hello, I try to register a custom privileg with the following code. session =3D repository.login(new SimpleCredentials(user, pwd.to= CharArray()), workspace); JackrabbitWorkspace jrws =3D (JackrabbitWorkspace) session.getW= orkspace(); PrivilegeManager privMgr =3D jrws.getPrivilegeManager(); privMgr.registerPrivilege("gcms_role_chief", false, new String[= ] {}); session.save(); The code seems to work fine (it runs with no exception). The next time when I try to access the repository I get the following excep= tion: Exception in thread "main" javax.jcr.RepositoryException: Duplicate entry f= or custom privilege with name {}gcms_role_chief at org.apache.jackrabbit.core.security.authorization.PrivilegeRegistry$Cus= tomPrivilegeStore.load(PrivilegeRegistry.java:1078) at org.apache.jackrabbit.core.security.authorization.PrivilegeRegistry$Cus= tomPrivilegeStore.access$100(PrivilegeRegistry.java:1046) at org.apache.jackrabbit.core.security.authorization.PrivilegeRegistry.(PrivilegeRegistry.java:165) at org.apache.jackrabbit.core.RepositoryImpl.(RepositoryImpl.java:27= 3) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:58= 9) at at.spardat.jackrabbit.test.DumpRepository.main(DumpRepository.java:46) Does somebody know how I could register a custom privilege the right way? Thx in advance! ferry malzer