Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 52255 invoked from network); 16 Mar 2010 19:41:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Mar 2010 19:41:03 -0000 Received: (qmail 65909 invoked by uid 500); 16 Mar 2010 19:41:02 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 65885 invoked by uid 500); 16 Mar 2010 19:41:02 -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 65876 invoked by uid 99); 16 Mar 2010 19:41:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Mar 2010 19:41:02 +0000 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=AWL,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of justinedelson@gmail.com designates 209.85.221.187 as permitted sender) Received: from [209.85.221.187] (HELO mail-qy0-f187.google.com) (209.85.221.187) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Mar 2010 19:40:56 +0000 Received: by qyk17 with SMTP id 17so128365qyk.11 for ; Tue, 16 Mar 2010 12:40:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=m9RL+orIgZKcpFlPuZpeCpYP4aAjkQXFejV8FHnXma4=; b=oyE5NB/iiLjPFZiuRX69Vry0Y18xbxfuO7Dy0QIlIz0CNFJiTuupNSo29IctOSGaub BHLODprgzHtzUmQTa7xDgFXPli3jUVqSUIdn7Zq2hlQ9hmtSPIlAtN2sIs0ChlT7wRqX J7mgfpAiU+pL9wMZlhBgCUVRWX0cGWYPVVlWM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=jbenSjGqvpqo4Fg+3U4/WVPo+j43XfMmOMFd3FKlsrWWQO/zFFCZBYAhcmjhcHhDKg mK/ylDfl7EekrCQTqHg9sSYNamiCZupwGLJgcxCCzFdqDBEeh+/wjVn71KHHwYOvpjTw I0ivoNPgKbCvDwpRkJlAnI5gfFr/3R0gT33fI= Received: by 10.224.35.204 with SMTP id q12mr1678qad.60.1268768369162; Tue, 16 Mar 2010 12:39:29 -0700 (PDT) Received: from Justin-Edelsons-iMac.local (ool-44c6554e.dyn.optonline.net [68.198.85.78]) by mx.google.com with ESMTPS id 5sm2207485qwg.23.2010.03.16.12.39.28 (version=SSLv3 cipher=RC4-MD5); Tue, 16 Mar 2010 12:39:28 -0700 (PDT) Message-ID: <4B9FDE6F.208@gmail.com> Date: Tue, 16 Mar 2010 15:39:27 -0400 From: Justin Edelson Reply-To: justin@justinedelson.com User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Accessing workspace other than default ? References: <7ec3c64c1003160506h4f2ae591oe1b2107b0ef21259@mail.gmail.com> <8fb1e0d21003160535g17ceb411n441227449dcb0687@mail.gmail.com> <1A7308FF-68C4-4B30-839E-D75A52AA724B@sptci.com> <8fb1e0d21003160600v1b9619a3l3ad28c9cba78156@mail.gmail.com> <8fb1e0d21003160652j6258cfcckb7cb9cba869d6ce5@mail.gmail.com> <4B9F9902.7060104@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit > @Justin > Could you tell your all process, as I'm now confused with the paths and > locks ;-)!! I'm using Sling with an embedded Jackrabbit 2 repository. The code which calls createWorkspace() is running in-process. >From JCR-2003, you can see that createWorkspace() isn't supported when remoting via DavEx. It might over RMI. In any case, I would recommend finding a way to execute code in the Jackrabbit JVM. As for locks... the Jackrabbit home directory (file:///Path/to/Jackrabbit/Test/jackrabbit) can only be used by one JVM at a time. But you got the workspace.xml file to be created, so you're obviously able to get the workspace created. What persistence manager are you using? Justin On 3/16/10 1:50 PM, Jacques Granduel wrote: > Thanks for fixing the FAQ... > > Could you tell me how you created the workspace : > I put jackrabbit-standalone-2.0.0.jar in folder Tests. So there's only the > java in the folder > > --repo path/to/jackrabbit //<< what is the repository to make it accessible > as URL? > >> java -Xmx256m -jar jackrabbit-standalone-2.0.0.jar > -> creates jackrabbit/... > > 1. connection thru url > rep = JcrUtils.getRepository("http://localhost:8080/server") > ssn = rep.login(creds) > root = ssn.getRootNode() > root.addNode("N1") > ssn.save() > -> OK > ssn.getWorkspace().createWorkspace("W2") > -> java.lang.UnsupportedOperationException: JCR-2003. Implementation > missing.This is OK > > 2. connection thru file pseudo-protocol: > r = JcrUtils.getRepository("file:///Path/to/Jackrabbit/Test/jackrabbit") > ssn = r.login(creds) > javax.jcr.RepositoryException: The repository home > Path\to\Jackrabbit\Test\jackrabbit appears to be in use since the file named > .lock is lo > cked by another process. > ?? > > 3. Stopping Jackrabbit server and redoing 2. is OK > r = JcrUtils.getRepository("file:///Path/to/Jackrabbit/Test/jackrabbit") > ssn = r.login(creds) > ssn.getWorkspace().createWorkspace("W3") //good W3 is available with > http://localhost:8080/server/W3 > But I have to stop Jackrabbit because of the .lock file > > 4.jackrabbit running >> java -Xmx256m -jar jackrabbit-standalone-2.0.0.jar > > in the same folder as jackrabbit > r = JcrUtils.getRepository() > ssn = r.login(creds) > --> creates a new "repository" folder! > ssn.getWorkspace().createWorkspace("W3") > -> is created in repository/workspaces/W3 instead of > jackrabbit/repository/workspaces/W3 > > Hope I'm clear in this simple use cases and that I reported everything > correctly! > > @Justin > Could you tell your all process, as I'm now confused with the paths and > locks ;-)!! > > Cheers, jgr > > > > > > 2010/3/16 Alexander Klimetschek > >> On Tue, Mar 16, 2010 at 15:43, Justin Edelson >> wrote: >>> I created JCR-2571 for this. >> >> Thanks, I fixed it. (Note that we have a separate JCRSITE project in >> the ASF jira for jackrabbit website related stuff). >> >>> I would still recommend referring to the spec first. >> >> My usual advise: download the spec pdf, print it and read most parts >> before doing major coding or design decisions. It's a good read. >> >> Regards, >> Alex >> >> -- >> Alexander Klimetschek >> alexander.klimetschek@day.com >> >