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 A2BD37E20 for ; Tue, 20 Sep 2011 08:45:27 +0000 (UTC) Received: (qmail 13509 invoked by uid 500); 20 Sep 2011 08:45:27 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 13427 invoked by uid 500); 20 Sep 2011 08:45:27 -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 13419 invoked by uid 99); 20 Sep 2011 08:45:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 08:45:27 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of markus.joschko@gmail.com designates 74.125.82.50 as permitted sender) Received: from [74.125.82.50] (HELO mail-ww0-f50.google.com) (74.125.82.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 08:45:19 +0000 Received: by wwe3 with SMTP id 3so515925wwe.19 for ; Tue, 20 Sep 2011 01:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=socgzsfdkCXEbXFm0QofqEj7Ds8QY597jz4TY4c3rLA=; b=FokrtLIm2owZ3FNmwWVEBeGjDoDed4jj28ji/ki38nupwZFq+NnQJ6YqHM9bxG6mt4 C288NFRaE79K2u9jGzaIWUCFluYi3ewZE2TCNYhPtbYfTkRcj0j82wph0K+5hgbKnHX4 6YLqg2mAdf9aEjoKx+lrD8bh44OmbGysOKt1w= MIME-Version: 1.0 Received: by 10.216.203.79 with SMTP id e57mr599167weo.2.1316508299184; Tue, 20 Sep 2011 01:44:59 -0700 (PDT) Received: by 10.216.80.139 with HTTP; Tue, 20 Sep 2011 01:44:59 -0700 (PDT) In-Reply-To: References: Date: Tue, 20 Sep 2011 10:44:59 +0200 Message-ID: Subject: Re: Not possible to get a secured repository with the JCRUtils.getRepository From: Markus Joschko To: users@jackrabbit.apache.org, fcarriedos@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Francisco, I'll specifically try to connect to a webdav repository and do not want to start the repository. There is nothing wrong with the webdav url. It works fine if I allow anonymous read rights. Regards, Markus On Tue, Sep 20, 2011 at 10:25 AM, Francisco Carriedo Scher wrote: > Hi there, > > --cli option requires from you to specify the path where your repository.= xml > file (the one which contains the repository configuration) relies (but yo= u > don't have to add the repository.xml name to the end of the path), for > example: > > =A0java -jar jackrabbit-standalone-2.2.7.jar --cli > file:///path/to/repositoryxmlfile/ > > For more info about options try: > > =A0java -jar jackrabbit-standalone-2.2.7.jar --help > > Hope that helps! > > > > 2011/9/19 Markus Joschko > >> Hi, >> is it just my setup or is there no way to get access to a repository >> via JCRUtils.getRepository when >> there is the anonymous user disabled? >> >> The davex RepositoryFactory doesn't seem to recognize that there is a >> valid repository if just the credentials are provided. >> >> =A0java -jar target/jackrabbit-standalone-2.3-SNAPSHOT.jar --cli >> http://localhost:8080 >> Exception in thread "main" javax.jcr.RepositoryException: Unable to >> access a repository with the following settings: >> =A0 =A0org.apache.jackrabbit.repository.uri: http://localhost:8080 >> The following RepositoryFactory classes were consulted: >> =A0 =A0org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory: declined >> =A0 =A0org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory: declined >> =A0 =A0org.apache.jackrabbit.commons.JndiRepositoryFactory: declined >> =A0 =A0org.apache.jackrabbit.core.RepositoryFactoryImpl: declined >> =A0 =A0org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory: failed >> =A0 =A0 =A0 =A0because of RepositoryException: Failed to read the resour= ce at >> URL http://localhost:8080 >> =A0 =A0 =A0 =A0because of IOException: Server returned HTTP response cod= e: >> 401 for URL: http://localhost:8080 >> Perhaps the repository you are trying to access is not available at the >> moment. >> =A0 =A0 =A0 =A0at >> org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:216) >> =A0 =A0 =A0 =A0at >> org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:256) >> =A0 =A0 =A0 =A0at org.apache.jackrabbit.standalone.Main.run(Main.java:12= 7) >> =A0 =A0 =A0 =A0at org.apache.jackrabbit.standalone.Main.main(Main.java:6= 1) >> >> This problem does not appear when using a browser. There I am asked >> for my credentials. >> >> Regards, >> =A0Markus >> >