Jörg Hoh created JCR-3827:
-----------------------------

             Summary: Duplicate custom privileges prevent startup of the 
repository
                 Key: JCR-3827
                 URL: https://issues.apache.org/jira/browse/JCR-3827
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
    Affects Versions: 2.6.2
            Reporter: Jörg Hoh


We run 2 Jackrabbit instances against a single database; we're running an 
application on top, which registeres custom privilege during deployments.

While this works normally, we encountered today a strange situation; on the 
startup of the repository we got this exception:

{code}
4.10.2014 16:49:15.369 *INFO* [FelixStartLevel] 
org.apache.jackrabbit.core.RepositoryImpl Starting repository...
24.10.2014 16:49:16.266 *ERROR* [FelixStartLevel] 
org.apache.jackrabbit.core.RepositoryImpl failed to start Repository: Duplicate 
entry for custom privilege with name {http://www.xxx.de/pv/1.0}myPriv 
javax.jcr.RepositoryException: Duplicate entry for custom privilege with name 
{http://www.xxxx.de/pv/1.0}myPriv
        at 
org.apache.jackrabbit.core.security.authorization.PrivilegeRegistry$CustomPrivilegeStore.load(PrivilegeRegistry.java:1087)
        at 
org.apache.jackrabbit.core.security.authorization.PrivilegeRegistry$CustomPrivilegeStore.access$100(PrivilegeRegistry.java:1055)
        at 
org.apache.jackrabbit.core.security.authorization.PrivilegeRegistry.<init>(PrivilegeRegistry.java:165)
        at 
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:273)
{code}

When we dumped the respective row in the database, we got this:

{code}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
--><privileges xmlns:pv="http://www.xxx.de/pv/1.0";>
<!-- some other privileges -->
<privilege abstract="false" name="pv:myPriv"/>
<privilege abstract="false" name="pv:myPriv"/>
</privileges>
{code}

How can this happen? From what I see no duplicates should be added to the 
registry. How can I debug this issue further?





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to