You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Elodie Tasia <e....@ever-team.com> on 2002/03/22 10:13:18 UTC

problem with Apache & propfind

Hi !

When I use the constructor method WebdavResource(HttpUrl, action, depth), it works very well if the HttpUrl corresponds to a resource on a Slide server (with host = localhost and port = 8080).
But when I use it for a resource on Apache/mod_dav server (port = 80), I get that horrible message :

org.apache.commons.httpclient.HttpException: Unauthorized  401
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:643)
 at org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:2829)
 at org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:2798)
 at org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:693)
 at org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:680)
 at org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1539)
 at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:987) 
 at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1006)
 at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1085)
 at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1103)
 at org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:275)

and I don't understand why, because I set right user info (or I think I'm right).
In my httpd.conf I have this :

<Directory />
    AuthName everteam
    AuthType Basic
    AuthGroupFile "D:\Program Files\Apache Group\Apache\conf\ap_group.conf"
    AuthUserFile "D:\Program Files\Apache Group\Apache\conf\ap_user.conf"
    AuthAuthoritative on
    Options FollowSymLinks
    AllowOverride None
    DAV On
   <Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
           Require user admin frb elo
   </Limit>
</Directory>

and the passwords of two users frb and elo are in the file ap_user.conf. So I think this is right configured (but I'm not sure, I may have missed something).

Can someone help me ? I feel desperate :o(


Re: problem with Apache & propfind

Posted by Sung-Gu <je...@apache.org>.
----- Original Message ----- 
From: "Elodie Tasia" <e....@ever-team.com>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, March 22, 2002 11:21 PM
Subject: Re: problem with Apache & propfind


> > You should get HttpException and its message is about authentication.
> > As I remember it... And in HttpException you can set user info.
> >  I don't know why u don't get it right now. :(
> Yes, that's what I've just found : I had to set the userInfo for the
> HttpUrl, and not only for the WebdavResource...
> But you can't set any user if you call WebdavResource(String escapedUrl),
> don't you ?

Well, I don't think so.  It should work at least with SLIDE_1_0
We have an example called slide command line to implement that stuff..

BTW, actually... over a half year, I haven't taken care of the stuff.
It just hasn't been a long time for me to partipate in the project myself again...
So I have just only dim memory...  ^^;

> > What kinda slide version did u try to it?
> The last one : a nighlty built, not the release because there was a bud in
> the generation of host header (I think you remember of me : I talked about
> that last week ;o) )

A-ha!  Yes, I remember you... ;-)

Sung-Gu


Re: problem with Apache & propfind

Posted by Elodie Tasia <e....@ever-team.com>.
> You should get HttpException and its message is about authentication.
> As I remember it... And in HttpException you can set user info.
>  I don't know why u don't get it right now. :(
Yes, that's what I've just found : I had to set the userInfo for the
HttpUrl, and not only for the WebdavResource...
But you can't set any user if you call WebdavResource(String escapedUrl),
don't you ?

> What kinda slide version did u try to it?
The last one : a nighlty built, not the release because there was a bud in
the generation of host header (I think you remember of me : I talked about
that last week ;o) )


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: problem with Apache & propfind

Posted by Sung-Gu <je...@apache.org>.
----- Original Message ----- 
From: "Elodie Tasia" <e....@ever-team.com>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, March 22, 2002 7:44 PM
Subject: Re: problem with Apache & propfind


> I've just tried with the configuration you gave me and it doesn't work at
> all...
> 
> For my code, I got problem as soon as I call the constructeur :
> 
>         hUrl = new HttpURL(host, port, path);
>         davRes = new WebdavResource(hUrl, defaultAction, defaultDepth);
You should get HttpException and its message is about authentication.
As I remember it... And in HttpException you can set user info.
 I don't know why u don't get it right now. :(

>         davRes.setUserInfo(user, passwd);
Or you can set user info before hUrl.setUserInfo.
However, it's non-sense... because you might don't know whether you get the response status, 401 or not

> With host = "localhost", port=80, and path is the right path of a resource
> on the server.
> And the program does go to setUserInfo : it gets an error just before...
> As for the configuration of the server, I didn't change much things except
> that I gave you (and that configuration was given to me, I didn't write it
> myself, so I supposed it was ok)...
> 
> What I don't undestand too is why the propfind method is launched within the
> constructor method (you can see it in my message error).
> When I try that code :
> 
>         HttpClient client = new HttpClient();
>         client.setDebug(10);
>         client.startSession("localhost", 80, new Credentials(user, passwd));
> it works very well..
> And I can call after that methods like PROPFIND or PROPPATCH without any
> problem...
> 
> That makes a lot of incoherence, don't you think ?

Yes, I guess some part might be changed... :(

What kinda slide version did u try to it?

Sung-Gu


Re: Slide and MS JDBC driver

Posted by Ting Ning <ti...@yahoo.com>.
You need to do some special setup on cloned connection for MS JDBC Driver.
After I change the codes, it works for me. Please see attachement file.

Ting
----- Original Message -----
From: "Tom Wang" <to...@presidiosoftware.com>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, March 22, 2002 11:17 AM
Subject: RE: Slide and MS JDBC driver


> Yes we tested our product with it.  It is essentailly unusable.  We can't
> believe Microsoft released it as beta.
>
> -Tom
>
>
> > -----Original Message-----
> > From: Jacob Lund [mailto:jacob@qualiware.com]
> > Sent: Friday, March 22, 2002 4:03 AM
> > To: 'Slide Users Mailing List'
> > Subject: Slide and MS JDBC driver
> >
> >
> > Hi,
> >
> > Has anyone successfully tried Microsoft's own JDBC driver for sql server
> > 2000? I know the driver is still in beta.
> >
> > /Jacob
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>

RE: Slide and MS JDBC driver

Posted by Tom Wang <to...@presidiosoftware.com>.
Yes we tested our product with it.  It is essentailly unusable.  We can't
believe Microsoft released it as beta.

-Tom


> -----Original Message-----
> From: Jacob Lund [mailto:jacob@qualiware.com]
> Sent: Friday, March 22, 2002 4:03 AM
> To: 'Slide Users Mailing List'
> Subject: Slide and MS JDBC driver
>
>
> Hi,
>
> Has anyone successfully tried Microsoft's own JDBC driver for sql server
> 2000? I know the driver is still in beta.
>
> /Jacob
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Slide and MS JDBC driver

Posted by Jacob Lund <ja...@qualiware.com>.
Hi,

Has anyone successfully tried Microsoft's own JDBC driver for sql server
2000? I know the driver is still in beta.

/Jacob


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: problem with Apache & propfind

Posted by Elodie Tasia <e....@ever-team.com>.
I've just tried with the configuration you gave me and it doesn't work at
all...

For my code, I got problem as soon as I call the constructeur :

        hUrl = new HttpURL(host, port, path);
        davRes = new WebdavResource(hUrl, defaultAction, defaultDepth);
        davRes.setUserInfo(user, passwd);

With host = "localhost", port=80, and path is the right path of a resource
on the server.
And the program does go to setUserInfo : it gets an error just before...
As for the configuration of the server, I didn't change much things except
that I gave you (and that configuration was given to me, I didn't write it
myself, so I supposed it was ok)...

What I don't undestand too is why the propfind method is launched within the
constructor method (you can see it in my message error).
When I try that code :

        HttpClient client = new HttpClient();
        client.setDebug(10);
        client.startSession("localhost", 80, new Credentials(user, passwd));
it works very well..
And I can call after that methods like PROPFIND or PROPPATCH without any
problem...

That makes a lot of incoherence, don't you think ?



----- Original Message -----
From: "Sung-Gu" <je...@apache.org>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, March 22, 2002 11:23 AM
Subject: Re: problem with Apache & propfind


>
> ----- Original Message -----
> From: "Elodie Tasia" <e....@ever-team.com>
> To: "Slide Group" <sl...@jakarta.apache.org>
> Sent: Friday, March 22, 2002 6:13 PM
> Subject: problem with Apache & propfind
>
>
> org.apache.commons.httpclient.HttpException: Unauthorized  401
>
> <Directory />
>     AuthName everteam
>     AuthType Basic
>     AuthGroupFile "D:\Program Files\Apache
Group\Apache\conf\ap_group.conf"
>     AuthUserFile "D:\Program Files\Apache Group\Apache\conf\ap_user.conf"
>     AuthAuthoritative on
>     Options FollowSymLinks  <== U can set set "All" temporarily for ur
eaiser debugging
>     AllowOverride None
>     DAV On
>    Order allow, deny  <==  Please, add it.
>    Allow from .ur_domain.net (or ur_host or all)   <== Please, add it.
>    <Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
>            Require user admin frb elo
>    </Limit>
> </Directory>
>
> I think ur configuration is so stricted.  u need to set that ur client is
possible to get stuff from the server at least.
>
> If it wouldn't work well, additional information about ur password, ur
code and the additional server configuration is required to guess ur
problem.
>
> Sung-Gu
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: problem with Apache & propfind

Posted by Sung-Gu <je...@apache.org>.
----- Original Message ----- 
From: "Elodie Tasia" <e....@ever-team.com>
To: "Slide Group" <sl...@jakarta.apache.org>
Sent: Friday, March 22, 2002 6:13 PM
Subject: problem with Apache & propfind


org.apache.commons.httpclient.HttpException: Unauthorized  401

<Directory />
    AuthName everteam
    AuthType Basic
    AuthGroupFile "D:\Program Files\Apache Group\Apache\conf\ap_group.conf"
    AuthUserFile "D:\Program Files\Apache Group\Apache\conf\ap_user.conf"
    AuthAuthoritative on
    Options FollowSymLinks  <== U can set set "All" temporarily for ur eaiser debugging
    AllowOverride None
    DAV On
   Order allow, deny  <==  Please, add it.
   Allow from .ur_domain.net (or ur_host or all)   <== Please, add it.
   <Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
           Require user admin frb elo
   </Limit>
</Directory>

I think ur configuration is so stricted.  u need to set that ur client is possible to get stuff from the server at least.  

If it wouldn't work well, additional information about ur password, ur code and the additional server configuration is required to guess ur problem.

Sung-Gu