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 <[email protected]>
> On Tue, Mar 16, 2010 at 15:43, Justin Edelson <[email protected]>
> 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
> [email protected]
>