You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Christian Stocker <me...@chregu.tv> on 2009/02/08 21:38:27 UTC

davex question

Hi

Angela committed the davex spi module some days ago and first I want to
thank you for that. I already played with it and it looks really promising.

But I also already ran into my first issue. I wrote a little client for
testing purposes and I can't connect to the Standalone Server with it.
It aborts with
javax.jcr.RepositoryException: Unauthorized
because the Server answers with a 401 on the first REPORT request, which
is done on RepositoryImpl.create(config). Since I didn't find a way to
give the User/Password before that REPORT request, I'm a little bit at
loss now.

Testing with the CRX from Day on the server side, it works just fine. So
I'm wondering, if it's in my client, where I'm doing something wrong, or
if the server side is to blame :)

My code can be found here:

http://github.com/chregu/davexclient/blob/b9a9ac2ffd947466f3d8fb91e9a122a73d1cf308/src/ch/liip/jcr/davex/Test.java
http://github.com/chregu/davexclient/blob/b9a9ac2ffd947466f3d8fb91e9a122a73d1cf308/src/ch/liip/jcr/davex/DavexClient.java
and
http://github.com/chregu/davexclient/blob/b9a9ac2ffd947466f3d8fb91e9a122a73d1cf308/src/ch/liip/jcr/davex/RepositoryConfigImplTest.java

the stacktrace is here

http://wiki.github.com/chregu/davexclient/stacktrace

Any hints really appreciated

Greetings

christian


-- 
Liip is hiring: http://www.liip.ch/company/jobs
-- 
Liip is hiring: http://www.liip.ch/company/jobs
-- 
Liip AG  //  Feldstrasse 133 //  CH-8004 Zurich
Tel +41 43 500 39 81 // Mobile +41 76 561 88 60
www.liip.ch // blog.liip.ch // GnuPG 0x5CE1DECB


Re: Repository setup?

Posted by Olindo Pindaro <ol...@gammagroup.it>.
Thanks for suggestion, it ok now.

Olindo

2009/2/11 Angela Schreiber <an...@day.com>

> hi olindo
>
>  I am using webdav client api, but it is hard, no docs anywhere i feel me
>> hacker because i reverse code to understand API.
>>
>
> sorry for that
>
>  Do you now a good tutorial/guide?
>>
>
> the best docu i am aware of is the general introduction
> and tutorial provided with the apache httpclient project.
>
> the client api is just an extension of the httpclient
> adding some webdav specific stuff. the fundamentals
> are the same.
>
> regards
> angela
>
>
>
>


-- 
Olindo Pindaro
http://www.linkedin.com/in/olindopindaro
+39 3939455830

Re: Repository setup?

Posted by Angela Schreiber <an...@day.com>.
hi olindo

> I am using webdav client api, but it is hard, no docs anywhere i feel me
> hacker because i reverse code to understand API.

sorry for that

> Do you now a good tutorial/guide?

the best docu i am aware of is the general introduction
and tutorial provided with the apache httpclient project.

the client api is just an extension of the httpclient
adding some webdav specific stuff. the fundamentals
are the same.

regards
angela




Re: Repository setup?

Posted by Olindo Pindaro <ol...@gammagroup.it>.
Hi guys,

I am using webdav client api, but it is hard, no docs anywhere i feel me
hacker because i reverse code to understand API.

Do you now a good tutorial/guide?

Bye
Olindo

Re: Repository setup?

Posted by Thomas Müller <th...@day.com>.
Hi,

There are multiple derby jar files: derby-*.jar, derbyclient-*.jar, and
derbynet-*.jar. I suggest to try putting all of then in the tomcat
commons.lib folder. If it still can't find the derby jdbc driver then maybe
there is something wrong with your tomcat configuration.

Regards,
Thomas

AW: Repository setup?

Posted by Kurz Wolfgang <wo...@gwvs.de>.
I put all the jar files into the tomcat commons.lib folder

And I even tried to put the derby jar into my web application but it still cant build my resource saying it doesn't have suitable derby drivers.

Anyone have an idea?

Thx again:-)


-----Ursprüngliche Nachricht-----
Von: Jukka Zitting [mailto:jukka.zitting@gmail.com] 
Gesendet: Mittwoch, 11. Februar 2009 19:10
An: users@jackrabbit.apache.org
Betreff: Re: Repository setup?

Hi,

On Wed, Feb 11, 2009 at 5:42 PM, Kurz Wolfgang <wo...@gwvs.de> wrote:
> i am trying tos et up the Repository with JNDI
>
> and I am getting the following error:
>
> javax.jcr.RepositoryException: Cannot instantiate persistence manager
> org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager:
> No suitable driver found for jdbc:derby://telis.it.tfsh/telis/jackrabbit/jackrabbit/version/db;create=true:
> No suitable driver found for jdbc:derby://telis.it.tfsh/telis/jackrabbit/jackrabbit/version/db;create=true
>
> before I used RMI and never had to use any Derby drivers.
>
> Anyone have an idea where I am missing something?

Make sure that you have all required jars in your classpath. For
example you need the Derby jar if you're using the default persistence
managers in Jackrabbit. An easy way to get all the required jars is to
take them from the WEB-INF/lib directory of the Jackrabbit webapp.

BR,

Jukka Zitting

Re: Repository setup?

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Feb 11, 2009 at 5:42 PM, Kurz Wolfgang <wo...@gwvs.de> wrote:
> i am trying tos et up the Repository with JNDI
>
> and I am getting the following error:
>
> javax.jcr.RepositoryException: Cannot instantiate persistence manager
> org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager:
> No suitable driver found for jdbc:derby://telis.it.tfsh/telis/jackrabbit/jackrabbit/version/db;create=true:
> No suitable driver found for jdbc:derby://telis.it.tfsh/telis/jackrabbit/jackrabbit/version/db;create=true
>
> before I used RMI and never had to use any Derby drivers.
>
> Anyone have an idea where I am missing something?

Make sure that you have all required jars in your classpath. For
example you need the Derby jar if you're using the default persistence
managers in Jackrabbit. An easy way to get all the required jars is to
take them from the WEB-INF/lib directory of the Jackrabbit webapp.

BR,

Jukka Zitting

Repository setup?

Posted by Kurz Wolfgang <wo...@gwvs.de>.
Hello everyone,

i am trying tos et up the Repository with JNDI

and I am getting the following error:

javax.jcr.RepositoryException: Cannot instantiate persistence manager org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager: No suitable driver found for jdbc:derby://telis.it.tfsh/telis/jackrabbit/jackrabbit/version/db;create=true: No suitable driver found for jdbc:derby://telis.it.tfsh/telis/jackrabbit/jackrabbit/version/db;create=true

before I used RMI and never had to use any Derby drivers.

Anyone have an idea where I am missing something?

Thx a lot!

Wolfgang


Re: davex question

Posted by Angela Schreiber <an...@day.com>.
hi christian

> That was the general problem. I used jackrabbit-standalone and not
> jackrabbit-webapp and there web.xml wasn't changed to using
> JcrRemotingServlet.

ah... completely forgot about the jackrabbit-standalone,
which i keep commented on order to speed up the build
process.

but the standalone project should obviously be somewhat in sync
with the overall progress ;) i will fix that.

angela


Re: davex question

Posted by Christian Stocker <me...@chregu.tv>.
Hi



On 10.2.2009 10:42 Uhr, Angela Schreiber wrote:
> hi christian
> 
>> But I also already ran into my first issue. I wrote a little client for
>> testing purposes and I can't connect to the Standalone Server with it.
>> It aborts with
>> javax.jcr.RepositoryException: Unauthorized
>> because the Server answers with a 401 on the first REPORT request, which
>> is done on RepositoryImpl.create(config). Since I didn't find a way to
>> give the User/Password before that REPORT request, I'm a little bit at
>> loss now.
> 
> how does your web.xml look like?
> can you check if the missing-auth-mapping init-param
> is present and its value is empty.


That was the general problem. I used jackrabbit-standalone and not
jackrabbit-webapp and there web.xml wasn't changed to using
JcrRemotingServlet.

Copying that pathc to jackrabbit-standalone fixed all the problems and
it works fine now.

Thanks a lot

christian

> this forces a null-login on the repository unless auth is
> forces (e.g. by sending an auth header).
> 
> then i noticed that your url is "http://localhost:8080/server"
> unless you changed the defaults it should probably be
> http://localhost:8080/jackrabbit/server.
> 
> apart from that: i quickly made a simple test and it
> worked for me. ((i'll add that test setup to spi-contrib)).
> 
> regards
> angela

Re: davex question

Posted by Angela Schreiber <an...@day.com>.
hi christian

> But I also already ran into my first issue. I wrote a little client for
> testing purposes and I can't connect to the Standalone Server with it.
> It aborts with
> javax.jcr.RepositoryException: Unauthorized
> because the Server answers with a 401 on the first REPORT request, which
> is done on RepositoryImpl.create(config). Since I didn't find a way to
> give the User/Password before that REPORT request, I'm a little bit at
> loss now.

how does your web.xml look like?
can you check if the missing-auth-mapping init-param
is present and its value is empty.
this forces a null-login on the repository unless auth is
forces (e.g. by sending an auth header).

then i noticed that your url is "http://localhost:8080/server"
unless you changed the defaults it should probably be
http://localhost:8080/jackrabbit/server.

apart from that: i quickly made a simple test and it
worked for me. ((i'll add that test setup to spi-contrib)).

regards
angela