PROPFIND 409 conflict ERROR with timeout/deadlock

2007-09-27 Thread Shakti Shrivastava
I am getting 409 conflict error when trying to create a WebdavResource
object for a given URL. 

The code is trying to create a file along with any missing collections
(that may not exist). Everything works fine however the code seems to
deadlock when trying to create a WebdavResource object on the filename.
I am using startTransaction and commitTransaction to make sure the file
upload either completes successfully or fails completely. The code runs
fine, in that the file upload completes, but I want to understand the
reason of the timeout here and get rid of it. Can someone please shed
some light on this?

I have googled this and nowhere can I find 409 status code associated
with a PROPFIND. This leads me to believe that this timeout has
something to do with a lock. However, nowhere in my code am I explicitly
locking any resource (may be it's the startTransaction()?).

Thanks in advance.

Using:

Tomcat 5.5.x
Slide version 2.2 (from SVN)
JVM: 1.5.x

 

Here are the logs from the SLIDE server (2 lines prefixed with * are the
ones where the error is happening)

http-8081-Processor25, 25-Sep-2007 18:50:08, unauthenticated, GET, 404
"Not Found", 547 ms, /files/user-docs/user-57
http-8081-Processor24, 25-Sep-2007 18:50:31, unauthenticated, PROPFIND,
404 "Not Found", 781 ms, /files/user-docs/user-57
http-8081-Processor25, 25-Sep-2007 18:50:32, unauthenticated, PROPFIND,
207 "Multi-Status", 125 ms, /files
http-8081-Processor25, 25-Sep-2007 18:50:32, unauthenticated, LOCK, 200
"OK", 31 ms, /files
25 Sep 2007 18:50:32 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor25, 25-Sep-2007 18:50:32, unauthenticated, PROPFIND,
207 "Multi-Status", 63 ms, /files
25 Sep 2007 18:50:32 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor25, 25-Sep-2007 18:50:32, unauthenticated, MKCOL, 201
"Created", 219 ms, /files/user-docs/user-57
25 Sep 2007 18:50:33 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor25, 25-Sep-2007 18:50:33, unauthenticated, PROPFIND,
207 "Multi-Status", 281 ms, /files/3
25 Sep 2007 18:50:33 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor25, 25-Sep-2007 18:50:33, unauthenticated, PROPFIND,
207 "Multi-Status", 0 ms, /files/user-docs/user-57
** 25 Sep 2007 18:52:33 - file-meta-store - INFO - DEADLOCK
VICTIM: Thread Thread[http-8081-Processor23,5,main] marked transaction
branch http-8081-Processor23-1190771433584-32 for rollback
** http-8081-Processor23, 25-Sep-2007 18:50:33, unauthenticated,
PROPFIND, 409 "Conflict", 120063 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:33 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor24, 25-Sep-2007 18:52:33, unauthenticated, CHECKOUT,
404 "Not Found", 31 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:33 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor24, 25-Sep-2007 18:52:33, unauthenticated, GET, 404
"Not Found", 15 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:33 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor24, 25-Sep-2007 18:52:33, unauthenticated, PUT, 201
"Created", 109 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:34 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor24, 25-Sep-2007 18:52:34, unauthenticated, PROPPATCH,
207 "Multi-Status", 47 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:34 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor24, 25-Sep-2007 18:52:34, unauthenticated, PROPPATCH,
207 "Multi-Status", 0 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:34 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor24, 25-Sep-2007 18:52:34, unauthenticated, PROPPATCH,
207 "Multi-Status", 0 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:34 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor24, 25-Sep-2007 18:52:34, unauthenticated, PROPPATCH,
207 "Multi-Status", 47 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:34 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor24, 25-Sep-2007 18:52:34, unauthenticated, PROPPATCH,
207 "Multi-Status", 0 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:34 -
org.apache.slide.webdav.method.AbstractWebdavMethod - INFO - Using
external transaction 
http-8081-Processor24, 25-Sep-2007 18:52:34, unauthenticated, PROPPATCH,
207 "Multi-Status", 31 ms, /files/user-docs/user-57/myfile.txt
25 Sep 2007 18:52:34 -
org.apac

Re: Authentication with Slide - Slide vs tomcat Realm

2007-09-27 Thread Satish
Hi Arne,

I got that. I have implemented it and working fine, I could authenticate
with Slide this way. But after that this code is
not working, what I am trying here is get the webdadv resource..

import org.apache.commons.httpclient.HttpURL;



private HttpURL url;

private WebdavResource webdavResource;

this.url = new HttpURL( http://localhost/slide/files/abc.xml);


this.url.setUserinfo("root", "root");


this.webdavResource = new WebdavResource(this.url);



Now this is returning me "Bad Request" when I use
org.apache.commons.httpclient with version 3.1 and worked well when I use

older version of org.apache.commons.httpclient, version is less that 2.0.



Any clue.







- Original Message - 
From: "Arne v.Irmer" <[EMAIL PROTECTED]>
Cc: "Slide Users Mailing List" 
Sent: Thursday, September 27, 2007 7:01 PM
Subject: Re: Authentication with Slide - Slide vs tomcat Realm


> Satish schrieb:
> > Hey Arne,
> >
> > Thanks for quick response.
> >
> > Well I am using JAAS module from Slide site, they have made it available
for
> > authentication with Slide.
> > I did all configurations and tested by accessing from the browser and
> > DavExplorer, its working well. JAAS module responding preety good way.
> >
> > I then tried making HTTP based authentication using 3.1 lib and its also
> > working fine.
> >
> > Later I just was requesting webdav resource where 3.1 lib is configured
in
> > my app, and I was getting error with Slide as Bad Request.
> > Then i replaced this http 3.1 lib by older version and could get webdav
> > resource. But now I cant authenticate since AuthScope is not there in
older
> > version.
> >
> Hi Satish,
> As I said I'm using 3.01 and do the authentication that way:
> HttpClient client = new HttpClient();
>
> // Authentifizierung bei ews
> client.getState().setCredentials(
> new AuthScope(null,80),
> new UsernamePasswordCredentials("Username","UserPasswd")
> );
> // Create a method instance.
> GetMethod method = new GetMethod(downloadURL);
> method.setDoAuthentication(true);
>
> int statusCode = client.executeMethod(method);
> That works pretty well.
> Yours
>  Arne
>
> > JAAS is working fine but this is strange problem.
> >
> > Regards,
> > Satish
> >
> >
> > - Original Message - 
> > From: "Arne v.Irmer" <[EMAIL PROTECTED]>
> > To: "Slide Users Mailing List" 
> > Sent: Thursday, September 27, 2007 6:24 PM
> > Subject: Re: Authentication with Slide - Slide vs tomcat Realm
> >
> >
> >
> >> Hi Satish,
> >> Satish schrieb:
> >>
> >>> Hi Arne,
> >>>
> >>> I manage to authenticate with http client 3.1, latest http client
> >>>
> > library
> >
> >>> with JAAS module. But I could not get webdav resource now. Upon
> >>>
> > searching on
> >
> >>> the forum I found Slide is not supporting http client 3.x libraries.
> >>>
> >>>
> >> We are using http client 3.01 and it works.
> >>
> >>> I am trying with the typical JAAS authentication with LoginContext,
> >>>
> > where I
> >
> >>> am getting error as not able to create LoginContext since could not
able
> >>>
> > to
> >
> >>> locate the login configuration.
> >>>
> >>>
> >> This looks like a problem on the server side. I implemented my own JAAS
> >> authentication, so it might be different to your case. If would get
that
> >> error-message it will stress on not finding my JAAS implementation. I
> >> your case maybe the JAAS-Implementation you are using has a problem. In
> >> general speaking it could not be a problem of the version of http
> >> client, because basic authentication is standardized and well
> >> implemented in that client.
> >> You should have the same problems with other clients like DAVExplorer
etc.
> >>
> >>> Do you have any idea how we can use the http client library, which is
> >>> easiest way - or it is the limitation of Slide.
> >>>
> >>>
> >>> Regards,
> >>> Satish
> >>>
> >>>
> >>> - Original Message - 
> >>> From: "Arne v.Irmer" <[EMAIL PROTECTED]>
> >>> To: "Slide Users Mailing List" 
> >>> Sent: Monday, September 17, 2007 2:31 PM
> >>> Subject: Re: Authentication with Slide - Slide vs tomcat Realm
> >>>
> >>>
> >>>
> >>>
>  Hi Satish,
>  we have to discriminate between the client- and the server side.
>  If you have a successful login with DAVExplorer the server side is
now
>  working properly.
>  On client side you can easily access an address that is protected
with
>  basic authentication using the commons-http-client.(see
>  http://jakarta.apache.org/httpcomponents/httpclient-3.x/)
>  For authentication look at
> 
> 
> 
> >
http://jakarta.apache.org/httpcomponents/httpclient-3.x/authentication.html
> >
>  Hope that helps
>   Arne
> 
>  Satish schrieb:
> 
> 
> > Hi
> >
> > There were problem in environment variables, I set all environment
> > variables correctly and its seems to be working :)
> >

Re: Authentication with Slide - Slide vs tomcat Realm

2007-09-27 Thread Arne v.Irmer
Satish schrieb:
> Hey Arne,
>
> Thanks for quick response.
>
> Well I am using JAAS module from Slide site, they have made it available for
> authentication with Slide.
> I did all configurations and tested by accessing from the browser and
> DavExplorer, its working well. JAAS module responding preety good way.
>
> I then tried making HTTP based authentication using 3.1 lib and its also
> working fine.
>
> Later I just was requesting webdav resource where 3.1 lib is configured in
> my app, and I was getting error with Slide as Bad Request.
> Then i replaced this http 3.1 lib by older version and could get webdav
> resource. But now I cant authenticate since AuthScope is not there in older
> version.
>   
Hi Satish,
As I said I'm using 3.01 and do the authentication that way:
HttpClient client = new HttpClient();

// Authentifizierung bei ews
client.getState().setCredentials(
new AuthScope(null,80),
new UsernamePasswordCredentials("Username","UserPasswd")
);
// Create a method instance.
GetMethod method = new GetMethod(downloadURL);
method.setDoAuthentication(true);

int statusCode = client.executeMethod(method);
That works pretty well.
Yours
 Arne

> JAAS is working fine but this is strange problem.
>
> Regards,
> Satish
>
>
> - Original Message - 
> From: "Arne v.Irmer" <[EMAIL PROTECTED]>
> To: "Slide Users Mailing List" 
> Sent: Thursday, September 27, 2007 6:24 PM
> Subject: Re: Authentication with Slide - Slide vs tomcat Realm
>
>
>   
>> Hi Satish,
>> Satish schrieb:
>> 
>>> Hi Arne,
>>>
>>> I manage to authenticate with http client 3.1, latest http client
>>>   
> library
>   
>>> with JAAS module. But I could not get webdav resource now. Upon
>>>   
> searching on
>   
>>> the forum I found Slide is not supporting http client 3.x libraries.
>>>
>>>   
>> We are using http client 3.01 and it works.
>> 
>>> I am trying with the typical JAAS authentication with LoginContext,
>>>   
> where I
>   
>>> am getting error as not able to create LoginContext since could not able
>>>   
> to
>   
>>> locate the login configuration.
>>>
>>>   
>> This looks like a problem on the server side. I implemented my own JAAS
>> authentication, so it might be different to your case. If would get that
>> error-message it will stress on not finding my JAAS implementation. I
>> your case maybe the JAAS-Implementation you are using has a problem. In
>> general speaking it could not be a problem of the version of http
>> client, because basic authentication is standardized and well
>> implemented in that client.
>> You should have the same problems with other clients like DAVExplorer etc.
>> 
>>> Do you have any idea how we can use the http client library, which is
>>> easiest way - or it is the limitation of Slide.
>>>
>>>
>>> Regards,
>>> Satish
>>>
>>>
>>> - Original Message - 
>>> From: "Arne v.Irmer" <[EMAIL PROTECTED]>
>>> To: "Slide Users Mailing List" 
>>> Sent: Monday, September 17, 2007 2:31 PM
>>> Subject: Re: Authentication with Slide - Slide vs tomcat Realm
>>>
>>>
>>>
>>>   
 Hi Satish,
 we have to discriminate between the client- and the server side.
 If you have a successful login with DAVExplorer the server side is now
 working properly.
 On client side you can easily access an address that is protected with
 basic authentication using the commons-http-client.(see
 http://jakarta.apache.org/httpcomponents/httpclient-3.x/)
 For authentication look at


 
> http://jakarta.apache.org/httpcomponents/httpclient-3.x/authentication.html
>   
 Hope that helps
  Arne

 Satish schrieb:

 
> Hi
>
> There were problem in environment variables, I set all environment
> variables correctly and its seems to be working :)
>
> Now tomcat is understanding Slide user database, tomcat-users.xml not
> required anymore for authentication.
>
> I was checking this using DAVExplorer but now I need to implement and
> use API for authentication, so
>
> Is that JAAS package will help me in this, shall I need to use those
> API for authentication from my custom jsp client?
> Do you have any idea how can I directly use same authentication way
> like DAVExplorer using?
>
>
> Regards,
> Satish
>
>
> - Original Message -
> *From:* kiltesh patel 
> *To:* Slide Users Mailing List
>  ; Satish
> 
> *Sent:* Saturday, September 15, 2007 10:15 PM
> *Subject:* Re: Authentication with Slide - Slide vs tomcat Realm
>
> Hi Satish,
>
> try this...
>
> 1. 5) Set environment variable
> CATALINA_OPTS=-Djava.security.auth.login
>>>

Re: Authentication with Slide - Slide vs tomcat Realm

2007-09-27 Thread Satish

Hey Arne,

Thanks for quick response.

Well I am using JAAS module from Slide site, they have made it available for
authentication with Slide.
I did all configurations and tested by accessing from the browser and
DavExplorer, its working well. JAAS module responding preety good way.

I then tried making HTTP based authentication using 3.1 lib and its also
working fine.

Later I just was requesting webdav resource where 3.1 lib is configured in
my app, and I was getting error with Slide as Bad Request.
Then i replaced this http 3.1 lib by older version and could get webdav
resource. But now I cant authenticate since AuthScope is not there in older
version.

JAAS is working fine but this is strange problem.

Regards,
Satish


- Original Message - 
From: "Arne v.Irmer" <[EMAIL PROTECTED]>
To: "Slide Users Mailing List" 
Sent: Thursday, September 27, 2007 6:24 PM
Subject: Re: Authentication with Slide - Slide vs tomcat Realm


> Hi Satish,
> Satish schrieb:
> > Hi Arne,
> >
> > I manage to authenticate with http client 3.1, latest http client
library
> > with JAAS module. But I could not get webdav resource now. Upon
searching on
> > the forum I found Slide is not supporting http client 3.x libraries.
> >
> We are using http client 3.01 and it works.
> > I am trying with the typical JAAS authentication with LoginContext,
where I
> > am getting error as not able to create LoginContext since could not able
to
> > locate the login configuration.
> >
> This looks like a problem on the server side. I implemented my own JAAS
> authentication, so it might be different to your case. If would get that
> error-message it will stress on not finding my JAAS implementation. I
> your case maybe the JAAS-Implementation you are using has a problem. In
> general speaking it could not be a problem of the version of http
> client, because basic authentication is standardized and well
> implemented in that client.
> You should have the same problems with other clients like DAVExplorer etc.
> > Do you have any idea how we can use the http client library, which is
> > easiest way - or it is the limitation of Slide.
> >
> >
> > Regards,
> > Satish
> >
> >
> > - Original Message - 
> > From: "Arne v.Irmer" <[EMAIL PROTECTED]>
> > To: "Slide Users Mailing List" 
> > Sent: Monday, September 17, 2007 2:31 PM
> > Subject: Re: Authentication with Slide - Slide vs tomcat Realm
> >
> >
> >
> >> Hi Satish,
> >> we have to discriminate between the client- and the server side.
> >> If you have a successful login with DAVExplorer the server side is now
> >> working properly.
> >> On client side you can easily access an address that is protected with
> >> basic authentication using the commons-http-client.(see
> >> http://jakarta.apache.org/httpcomponents/httpclient-3.x/)
> >> For authentication look at
> >>
> >>
> >
http://jakarta.apache.org/httpcomponents/httpclient-3.x/authentication.html
> >
> >> Hope that helps
> >>  Arne
> >>
> >> Satish schrieb:
> >>
> >>> Hi
> >>>
> >>> There were problem in environment variables, I set all environment
> >>> variables correctly and its seems to be working :)
> >>>
> >>> Now tomcat is understanding Slide user database, tomcat-users.xml not
> >>> required anymore for authentication.
> >>>
> >>> I was checking this using DAVExplorer but now I need to implement and
> >>> use API for authentication, so
> >>>
> >>> Is that JAAS package will help me in this, shall I need to use those
> >>> API for authentication from my custom jsp client?
> >>> Do you have any idea how can I directly use same authentication way
> >>> like DAVExplorer using?
> >>>
> >>>
> >>> Regards,
> >>> Satish
> >>>
> >>>
> >>> - Original Message -
> >>> *From:* kiltesh patel 
> >>> *To:* Slide Users Mailing List
> >>>  ; Satish
> >>> 
> >>> *Sent:* Saturday, September 15, 2007 10:15 PM
> >>> *Subject:* Re: Authentication with Slide - Slide vs tomcat Realm
> >>>
> >>> Hi Satish,
> >>>
> >>> try this...
> >>>
> >>> 1. 5) Set environment variable
> >>> CATALINA_OPTS=-Djava.security.auth.login
> >>> .config=$CATALINA_HOME/conf/jaas
> >>> .config
> >>>
> >>> In place of = use == to set catalina_opts
> >>>
> >>> 2. Also, appName="slide_login" name should exactly match in
> >>> config.jaas file
> >>>
> >>> slide_login {
> >>>
> >>> 3. You can also try using JAVA_OPTS instead of CATALINA_OPTS
> >>>
> >>> 4. Also, check your classpath if it finds jaas.config and
> >>>  userClassNames="org.apache.slide.jaas.spi
> >>> .SlidePrincipal"
> >>>  roleClassNames="org.apache.slide.jaas.spi.SlideRole"
> >>> are in classpah.
> >>>
> >>> Regards
> >>> Kiltesh
> >>>
> >>>
> >>>
> >>> On 9/15/07, *Satish* <[EMAIL PROTECTED]
> >>> > wrote:
> >>>
> >>> Hi Arne
> >>>
> >>> Using your gu

Re: Authentication with Slide - Slide vs tomcat Realm

2007-09-27 Thread Arne v.Irmer
Hi Satish,
Satish schrieb:
> Hi Arne,
>
> I manage to authenticate with http client 3.1, latest http client library
> with JAAS module. But I could not get webdav resource now. Upon searching on
> the forum I found Slide is not supporting http client 3.x libraries.
>   
We are using http client 3.01 and it works.
> I am trying with the typical JAAS authentication with LoginContext, where I
> am getting error as not able to create LoginContext since could not able to
> locate the login configuration.
>   
This looks like a problem on the server side. I implemented my own JAAS
authentication, so it might be different to your case. If would get that
error-message it will stress on not finding my JAAS implementation. I
your case maybe the JAAS-Implementation you are using has a problem. In
general speaking it could not be a problem of the version of http
client, because basic authentication is standardized and well
implemented in that client.
You should have the same problems with other clients like DAVExplorer etc.
> Do you have any idea how we can use the http client library, which is
> easiest way - or it is the limitation of Slide.
>
>
> Regards,
> Satish
>
>
> - Original Message - 
> From: "Arne v.Irmer" <[EMAIL PROTECTED]>
> To: "Slide Users Mailing List" 
> Sent: Monday, September 17, 2007 2:31 PM
> Subject: Re: Authentication with Slide - Slide vs tomcat Realm
>
>
>   
>> Hi Satish,
>> we have to discriminate between the client- and the server side.
>> If you have a successful login with DAVExplorer the server side is now
>> working properly.
>> On client side you can easily access an address that is protected with
>> basic authentication using the commons-http-client.(see
>> http://jakarta.apache.org/httpcomponents/httpclient-3.x/)
>> For authentication look at
>>
>> 
> http://jakarta.apache.org/httpcomponents/httpclient-3.x/authentication.html
>   
>> Hope that helps
>>  Arne
>>
>> Satish schrieb:
>> 
>>> Hi
>>>
>>> There were problem in environment variables, I set all environment
>>> variables correctly and its seems to be working :)
>>>
>>> Now tomcat is understanding Slide user database, tomcat-users.xml not
>>> required anymore for authentication.
>>>
>>> I was checking this using DAVExplorer but now I need to implement and
>>> use API for authentication, so
>>>
>>> Is that JAAS package will help me in this, shall I need to use those
>>> API for authentication from my custom jsp client?
>>> Do you have any idea how can I directly use same authentication way
>>> like DAVExplorer using?
>>>
>>>
>>> Regards,
>>> Satish
>>>
>>>
>>> - Original Message -
>>> *From:* kiltesh patel 
>>> *To:* Slide Users Mailing List
>>>  ; Satish
>>> 
>>> *Sent:* Saturday, September 15, 2007 10:15 PM
>>> *Subject:* Re: Authentication with Slide - Slide vs tomcat Realm
>>>
>>> Hi Satish,
>>>
>>> try this...
>>>
>>> 1. 5) Set environment variable
>>> CATALINA_OPTS=-Djava.security.auth.login
>>> .config=$CATALINA_HOME/conf/jaas
>>> .config
>>>
>>> In place of = use == to set catalina_opts
>>>
>>> 2. Also, appName="slide_login" name should exactly match in
>>> config.jaas file
>>>
>>> slide_login {
>>>
>>> 3. You can also try using JAVA_OPTS instead of CATALINA_OPTS
>>>
>>> 4. Also, check your classpath if it finds jaas.config and
>>>  userClassNames="org.apache.slide.jaas.spi
>>> .SlidePrincipal"
>>>  roleClassNames="org.apache.slide.jaas.spi.SlideRole"
>>> are in classpah.
>>>
>>> Regards
>>> Kiltesh
>>>
>>>
>>>
>>> On 9/15/07, *Satish* <[EMAIL PROTECTED]
>>> > wrote:
>>>
>>> Hi Arne
>>>
>>> Using your guidelines I tried configuring JAAS with Slide.
>>>
>>> I did something like:
>>>
>>> 1)
>>> Configure tomcat web.xml to have
>>>   >> useNaming="true">
>>> >>   appName="slide_login"
>>>
>>>   
> userClassNames="org.apache.slide.jaas.spi.SlidePrincipal"
>   
>>>   roleClassNames="org.apache.slide.jaas.spi.SlideRole"
>>>   name="Slide DAV Server"
>>>   useContextClassLoader="false" />
>>>   
>>> in Host.
>>>
>>> 2) Copied jaas.config file in conf folder of tomcat
>>>
>>> 3) Copied slide-jaas-2.1.jar in \\Tomcat 5.5\common\lib folder
>>>
>>> 4) Uncommented  from Slide web.xml
>>>
>>> 5) Set environment variable
>>>
>>>   
> CATALINA_OPTS=-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas
>   
>>> .config
>>>
>>> Retsrated tomcat server and then tried connecting Slide using
>>> Web DAV Explorer client provided by Slide, but when I tried
>>> login, tomcat log says:
>>>
>>> Unable to locate a login configuration...here i

Re: Authentication with Slide - Slide vs tomcat Realm

2007-09-27 Thread Satish
Hi Arne,

I manage to authenticate with http client 3.1, latest http client library
with JAAS module. But I could not get webdav resource now. Upon searching on
the forum I found Slide is not supporting http client 3.x libraries.

I am trying with the typical JAAS authentication with LoginContext, where I
am getting error as not able to create LoginContext since could not able to
locate the login configuration.

Do you have any idea how we can use the http client library, which is
easiest way - or it is the limitation of Slide.


Regards,
Satish


- Original Message - 
From: "Arne v.Irmer" <[EMAIL PROTECTED]>
To: "Slide Users Mailing List" 
Sent: Monday, September 17, 2007 2:31 PM
Subject: Re: Authentication with Slide - Slide vs tomcat Realm


> Hi Satish,
> we have to discriminate between the client- and the server side.
> If you have a successful login with DAVExplorer the server side is now
> working properly.
> On client side you can easily access an address that is protected with
> basic authentication using the commons-http-client.(see
> http://jakarta.apache.org/httpcomponents/httpclient-3.x/)
> For authentication look at
>
http://jakarta.apache.org/httpcomponents/httpclient-3.x/authentication.html
>
> Hope that helps
>  Arne
>
> Satish schrieb:
> > Hi
> >
> > There were problem in environment variables, I set all environment
> > variables correctly and its seems to be working :)
> >
> > Now tomcat is understanding Slide user database, tomcat-users.xml not
> > required anymore for authentication.
> >
> > I was checking this using DAVExplorer but now I need to implement and
> > use API for authentication, so
> >
> > Is that JAAS package will help me in this, shall I need to use those
> > API for authentication from my custom jsp client?
> > Do you have any idea how can I directly use same authentication way
> > like DAVExplorer using?
> >
> >
> > Regards,
> > Satish
> >
> >
> > - Original Message -
> > *From:* kiltesh patel 
> > *To:* Slide Users Mailing List
> >  ; Satish
> > 
> > *Sent:* Saturday, September 15, 2007 10:15 PM
> > *Subject:* Re: Authentication with Slide - Slide vs tomcat Realm
> >
> > Hi Satish,
> >
> > try this...
> >
> > 1. 5) Set environment variable
> > CATALINA_OPTS=-Djava.security.auth.login
> > .config=$CATALINA_HOME/conf/jaas
> > .config
> >
> > In place of = use == to set catalina_opts
> >
> > 2. Also, appName="slide_login" name should exactly match in
> > config.jaas file
> >
> > slide_login {
> >
> > 3. You can also try using JAVA_OPTS instead of CATALINA_OPTS
> >
> > 4. Also, check your classpath if it finds jaas.config and
> >  userClassNames="org.apache.slide.jaas.spi
> > .SlidePrincipal"
> >  roleClassNames="org.apache.slide.jaas.spi.SlideRole"
> > are in classpah.
> >
> > Regards
> > Kiltesh
> >
> >
> >
> > On 9/15/07, *Satish* <[EMAIL PROTECTED]
> > > wrote:
> >
> > Hi Arne
> >
> > Using your guidelines I tried configuring JAAS with Slide.
> >
> > I did something like:
> >
> > 1)
> > Configure tomcat web.xml to have
> >> useNaming="true">
> >  >   appName="slide_login"
> >
userClassNames="org.apache.slide.jaas.spi.SlidePrincipal"
> >   roleClassNames="org.apache.slide.jaas.spi.SlideRole"
> >   name="Slide DAV Server"
> >   useContextClassLoader="false" />
> >   
> > in Host.
> >
> > 2) Copied jaas.config file in conf folder of tomcat
> >
> > 3) Copied slide-jaas-2.1.jar in \\Tomcat 5.5\common\lib folder
> >
> > 4) Uncommented  from Slide web.xml
> >
> > 5) Set environment variable
> >
CATALINA_OPTS=-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas
> > .config
> >
> > Retsrated tomcat server and then tried connecting Slide using
> > Web DAV Explorer client provided by Slide, but when I tried
> > login, tomcat log says:
> >
> > Unable to locate a login configuration...here is the error for
> > details
> >
> > Sep 15, 2007 8:26:27 PM org.apache.catalina.realm.JAASRealm
> > authenticate
> > SEVERE: Unexpected error
> > java.lang.SecurityException: Unable to locate a login
> > configuration
> > at com.sun.security.auth.login.ConfigFile.(Unknown Source)
> > at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> > at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> > Source)
> > at
> >
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> > Source)
> > at java.lang.reflect.Constructor.newIns

Re: ubuntu + tomcat5: error initializing domain

2007-09-27 Thread Pere Cortada Bonjoch
I've found it!!!
Thanks for the answer Miguel as far as i know (minimal features test)
java 6 is ok with slide (wow: true retrocompatibility!)

The problem disappeared when i set  to no the  "TOMCAT_SECURITY" = yes
directive in /etc/init.d/tomcat5,  i suppose it's a jaas permission
problem, but i didn't wanted to dive into ity now..

Then i was able to load the domain, (well, also get some unix
permissions problems with the store folder, but i changed store/ for
/var/slide-data and chowned it to tomcat user ).

Now it works perfectly, i suppose that with a security disabled and
root owned tomcat the installation will go fine (but risky!)

Thanks a
On 9/27/07, Miguel Figueiredo <[EMAIL PROTECTED]> wrote:
>
> Hello Pere,
>
>  I'm not sure that Slide is Java 6 compatible. Have you tried using it with
> a jdk5?
>
>  Hope this helps,
>  Miguel Figueiredo
>
>
> -Original Message-
> From: Pere Cortada Bonjoch [mailto:[EMAIL PROTECTED]
> Sent: quarta-feira, 26 de Setembro de 2007 22:34
> To: slide-user@jakarta.apache.org
> Subject: ubuntu + tomcat5: error initializing domain
>
> Hi,
>
> I've just installed a fresh version of tomcat 5 on ubuntu 7.04 (Feisty).
> When starting tomcat (/etc/init.d/tomcat5 start) I receive a exception
> initializing Domain:
>
> 26 Sep 2007 23:00:57 - org.apache.slide.common.Domain - INFO -
> Initializing Domain
> java.lang.ExceptionInInitializerError
> at org.apache.slide.common.Domain.init(Domain.java:413)
> at org.apache.slide.common.Domain.init(Domain.java:366)
> at org.apache.slide.common.Domain.init(Domain.java:329)
> at
> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:253)
> at javax.servlet.GenericServlet.init(GenericServlet.java:211)
> at
> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:195)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> .
> .
> .
>
> Caused by: java.security.AccessControlException: access denied
> (java.io.FilePermission
> /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/slide.properties read)
> at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java
> :323)
> at
> java.security.AccessController.checkPermission(AccessController.java:546)
> at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
> at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
> at java.io.File.exists(File.java:731)
>.
>.
>
>
> I think there must be an erro in ClassPath because it's searching  in
> /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/ that it's my
> $JAVA_HOME/jre/lib instead than in $CATALINA_HOME/common/classes or
> WEB-INF folder.
>
> Anyone know where it's defined the slide.war classpath to avoid searching
> there?
>
> Thanks a lot
> PD: i've tried to create the slide.properties and give permissions,
> but it didn't work
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: ubuntu + tomcat5: error initializing domain

2007-09-27 Thread Miguel Figueiredo

Hello Pere,

 I'm not sure that Slide is Java 6 compatible. Have you tried using it with
a jdk5?

 Hope this helps,
 Miguel Figueiredo


-Original Message-
From: Pere Cortada Bonjoch [mailto:[EMAIL PROTECTED] 
Sent: quarta-feira, 26 de Setembro de 2007 22:34
To: slide-user@jakarta.apache.org
Subject: ubuntu + tomcat5: error initializing domain

Hi,

I've just installed a fresh version of tomcat 5 on ubuntu 7.04 (Feisty).
When starting tomcat (/etc/init.d/tomcat5 start) I receive a exception
initializing Domain:

26 Sep 2007 23:00:57 - org.apache.slide.common.Domain - INFO -
Initializing Domain
java.lang.ExceptionInInitializerError
at org.apache.slide.common.Domain.init(Domain.java:413)
at org.apache.slide.common.Domain.init(Domain.java:366)
at org.apache.slide.common.Domain.init(Domain.java:329)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:253)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:195)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
.
.
.

Caused by: java.security.AccessControlException: access denied
(java.io.FilePermission
/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/slide.properties read)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:323)
at
java.security.AccessController.checkPermission(AccessController.java:546)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.exists(File.java:731)
   .
   .


I think there must be an erro in ClassPath because it's searching  in
/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/ that it's my
$JAVA_HOME/jre/lib instead than in $CATALINA_HOME/common/classes or
WEB-INF folder.

Anyone know where it's defined the slide.war classpath to avoid searching
there?

Thanks a lot
PD: i've tried to create the slide.properties and give permissions,
but it didn't work

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]