Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F92F9D22 for ; Tue, 27 Sep 2011 10:36:36 +0000 (UTC) Received: (qmail 35623 invoked by uid 500); 27 Sep 2011 10:36:35 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 35563 invoked by uid 500); 27 Sep 2011 10:36:35 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 35556 invoked by uid 99); 27 Sep 2011 10:36:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Sep 2011 10:36:35 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Sep 2011 10:36:33 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DE5FB43738 for ; Tue, 27 Sep 2011 10:36:11 +0000 (UTC) Date: Tue, 27 Sep 2011 10:36:11 +0000 (UTC) From: "Julian Reschke (Commented) (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <351664618.2479.1317119771912.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1246165821.44238.1309192127761.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (JCR-3006) UserManager: concurrent user creation using same intermediate path fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115387#comment-13115387 ] Julian Reschke commented on JCR-3006: ------------------------------------- Angela notes that this is not specific to the "intermediate" path signature. The user manager might be configured to introduce intermediate paths automatically, in which case the same problem can occur. > UserManager: concurrent user creation using same intermediate path fails > ------------------------------------------------------------------------ > > Key: JCR-3006 > URL: https://issues.apache.org/jira/browse/JCR-3006 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: security > Affects Versions: 2.2.7 > Reporter: Stefan Guggisberg > Attachments: ConcurrentCreateUserTest.java, ConcurrentCreateUserTest.java, ConcurrentCreateUserTest.java > > > concurrently creating users using same intermediate path fails with "node ... has been modified externally". > the problem is the intermediate path. if it doesn't exist multiple threads try to create it concurrently: > o.a.jackrabbit.core.security.user.UserManagerImpl, line 1310ff: > String[] segmts = defaultPath.split("/"); > NodeImpl folder = (NodeImpl) session.getRootNode(); > String authRoot = (isGroup) ? groupsPath : usersPath; > for (String segment : segmts) { > if (segment.length() < 1) { > continue; > } > if (folder.hasNode(segment)) { > folder = (NodeImpl) folder.getNode(segment); > if (Text.isDescendantOrEqual(authRoot, folder.getPath()) && > !folder.isNodeType(NT_REP_AUTHORIZABLE_FOLDER)) { > throw new ConstraintViolationException("Invalid intermediate path. Must be of type rep:AuthorizableFolder."); > } > } else { > Node parent = folder; > folder = addNode(folder, session.getQName(segment), NT_REP_AUTHORIZABLE_FOLDER); > } > } > the attached test case illustrates this issue/ -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira