max revision limit?

2004-09-01 Thread
hi, friends
I met a weird problem. so far , I use client API to version control 
file(checkin/checkout).
the similar code is following:

webdavResource.checkout()
webdavResource.putmethod()
webdavResource.checkin()
I did it successfully in the first four times(version 1.0-1.4). But if I 
want to put the fifth version file(1.5) to slide, the process failed. I 
found that the putMehtod did upload the file, but checkout and checkin 
method didnot work well. 

I print out the statusMessage of webdavResource and get the following 
message:
from checkout method:  Conflick(409)
from checkin mehtod :WARN HttpMethodBase:2059 - Response content length is 
not known 
Internal Server Error (500).

did I do something wrong, or the slide just permit max 5 revision ?
_
 MSN Explorer:   http://explorer.msn.com/lccn/  

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


Re: max revision limit?

2004-09-01 Thread Jacob Lund
This might be a know problem with the datastore and the max length of 
property values. This should be solved i the latest database schemas!

What version of slide and what store are you using?
/jacob
- Original Message - 
From:   [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 9:16 AM
Subject: max revision limit?


hi, friends
I met a weird problem. so far , I use client API to version control 
file(checkin/checkout).
the similar code is following:

webdavResource.checkout()
webdavResource.putmethod()
webdavResource.checkin()
I did it successfully in the first four times(version 1.0-1.4). But if I 
want to put the fifth version file(1.5) to slide, the process failed. I 
found that the putMehtod did upload the file, but checkout and checkin 
method didnot work well.
I print out the statusMessage of webdavResource and get the following 
message:
from checkout method:  Conflick(409)
from checkin mehtod :WARN HttpMethodBase:2059 - Response content length 
is not known Internal Server Error (500).

did I do something wrong, or the slide just permit max 5 revision ?
_
 MSN Explorer:   http://explorer.msn.com/lccn/
-
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]


Need Help: Unexpected behaviour of slide 2.0 application

2004-09-01 Thread Mihir Solanki








Hi,



I have deployed slide.war (binary version of slide 2.0) file on Websphere app server 5.1 with security and authentication
OFF.



It is deployed
successfully and I can also connect to the http://localhost:9080/slide
through

my network place.



When I connect
through network place first time I can see following folders 



1.
actions

2.
files

3.
history

4.
workingresource

5.
workspace





I can see only these
folders as I have kept security and authentication OFF.



But now when I double
click on say files folders I am getting following messages

Websphere log



[9/1/04 13:36:50:909
IST] 665844ce TraceNLS u No message
text associated with 

key Failed.to.create.a.writer.with.encoding:.{0}..The.default.encoding.will.be.used. 

in bundle com.ibm.ejs.resources.seriousMessages



[9/1/04 13:36:50:909
IST] 665844ce SRTServletRes W Failed to create a
writer 

with encoding: UTF-8. The default encoding
will be used.



[9/1/04 13:36:51:190
IST] 665844ce SystemOut O Servlet.Engine.Transports :
0, 

01-Sep-2004 13:36:50, , PROPFIND, 207 Multi-Status, 468 ms, /



One more strange thing is when I double click files
folder instead of getting blank list I am getting following

list of folders on my windows explorer (basically in network
place)



1.
actions

2.
history

3.
slide

4.
workingresource

5.
workspace





So my questions are



1.
Is
there any problem of XML encoding used by slide with WebSphere. If yes
what could be the possible resolution of the same.

And
if not then why it is giving such message that Failed to create a
writer with encoding: UTF-8 (I know this is a warning message and
not an error).

2.
Secondly
if everything is OK then why it is showing my list of folders when I double
click on files folder.





Please do helpful



Thanks  Regards,

Mihir



Sr.
Software Engineer

SBU:
eBiz, Gandhinagar



Imaginations...
its limits are only those of the mind itself



_
This e-mail message may contain proprietary, confidential or legally privileged
information for the sole use of the person or entity to whom this message was
originally addressed. Any review, e-transmission dissemination or other use of
or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you have received
this e-mail in error kindly delete this e-mail from your records. If it appears
that this mail has been forwarded to you without proper authority, please
notify us immediately at [EMAIL PROTECTED]  and delete this mail.
__ 





http://www.patni.com
World-Wide Partnerships. World-Class Solutions.

_
 
This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_



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

Re: Can WebDAV servlet serve non-slide-managed filesystem?

2004-09-01 Thread alon salant
Deploying an additional scope seems to work fine.

It looks like I need to implement both RevisionDescriptorStore and
RevisionDescriptorsStore. Deploying with the Transient versions
deployed fine, but when trying to browse with the XP webdav client, I
got RevisionNotFoundExceptions for the uri of the resource.

So I tried just implementing
RevisionDescriptorsStore.retrieveRevisionDescriptors( ) as it is in
the JNDIPrincipalStore, but then I got Exceptions from
TransientDescriptorStore which seems to depend on the existence of
TransientDescriptorsStore (not sure about that one).

So I stubbed out both RevisionDescriptorStore and
RevisionDescriptorsStore. It looks like I need to implement
RevisionDescriptorStore.retrieveRevisionDescriptor( ). I implemented a
simple version that returns a new NodeRevisionDescriptor with its date
properties set. My /files node shows up as a 0 byte file in my webdav
browser, not a folder.

I am not sure about how to propertly create a NodeRevisionDescriptor -
which properties should be set folders, and which for files. Any
hints?

Am I off track here?

Alon

On Tue, 31 Aug 2004 09:10:36 -0700, James Mason [EMAIL PROTECTED] wrote:
 alon,
 Sorry I didn't think of this earlier. It will probably be easier, at
 least initialy, to have two store configured in your domain. Leave the
 default store in place with a scope of /, and add your store with a
 scope of /files. This way you won't have to mess with the data
 section of the domain, and you won't have to worry about returning
 ActionNodes.
 
 Once you have your store working you can decide how you want to handle
 the other information. It will probably be simplest to setup some basic
 permissions in your domain then map the webdav servlet to only server
 the /files node, but other options are available.
 
 -James
 
 
 
 alon salant wrote:
  Okay, I've partially answered one of my questions.
 
  Playing around and reading the config more carefully, I replaced the
  sample data element configuration with
 
  data
objectnode classname=org.apache.slide.structure.SubjectNode uri=/
  permission action=all subject=all inheritable=true/
/objectnode
  /data
 
  and can now directory browse through the webdav servlet. All I see is
  an empty root directory which is what I expect based on my initial
  SimpleFileStore implementation.
 
  Mapping a web folder from win xp is claiming that the folder you
  entered does not appear to be valid but I have not looked in to this
  yet.
 
  I am curious to know what of of the namespace configuration element is
  required for what I am trying to do.
 
  Alon
 
  On Tue, 31 Aug 2004 00:06:29 -0700, alon salant [EMAIL PROTECTED] wrote:
 
 I've decided to take an initial step of stubbing out my
 SimpleFileStore implementation and deploying it in my webapp.
 
 I started with the Domain.sample file from the 2.1b1 distribution and
 modified the namespace definition as follows:
 
 definition
   store name=files
 nodestore classname=photospace.slide.SimpleFileStore
   parameter name=rootpathstore/metadata/parameter
 /nodestore
 contentstore classname=photospace.slide.SimpleFileStore
   parameter name=rootpathstore/content/parameter
 /contentstore
 securitystore
 classname=org.apache.slide.store.mem.TransientSecurityStore/
 lockstore classname=org.apache.slide.store.mem.TransientLockStore/
 revisiondescriptorsstore
 classname=org.apache.slide.store.mem.TransientDescriptorsStore/
 revisiondescriptorstore
 classname=org.apache.slide.store.mem.TransientDescriptorStore/
   /store
   scope match=/ store=files/
 /definition
 
 SimpleFileStore implements NodeStore and ContentStore. This
 configuration deploys without error.
 
 
 Is SubjectNode an
 appropriate ObjectNode implementation to return from retrieveObject(
 )?
 
 Yes.
 
 I did find that retrieveObject( ) needs to return an ActionNode not
 SubjectNode for NamespaceConfig.getActionNode( ) which was being
 called in slide startup. I was getting a ClassCastException. So should
 I always return an ActionNode from retrieveObject( )? What's the
 difference from a SubjectNode?
 
 I have the slide WebDAV servlet configured and starting up without
 errors and with directory browsing turned on. However, when I browse
 to the servlet url, I get a 403 and a single log line from slide:
 
   http-8080-Processor25, 30-Aug-2004 23:43:47, unauthenticated, GET,
 403 Forbidden, 47 ms, /
 
 Note that I have not removed the sample namespace configuration or
 data from the Domain.sample file that I started with. Reading this
 file, I'm not sure what is necessary and what does not apply. I'm
 guessing that most of the configuration is necessary and that the info
 in the data element can go. Correct?
 
 Any thoughts on how to get past my 403?
 
 Alon
 
 
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

Versioning and checkout

2004-09-01 Thread Martin, Stefan
Hallo 

habe ich die Möglichkeit, Domumente die im XML-Filestore in Slide vorhanden
sind,
auszuchecken? Ich möchte die Dokumente auf einen anderen Server Windows NT
als Laufwerk einbinden. Kann man auf die Webordner, als solcher habe ich
zwar
Zugriff, unter DOS irgendwie zugreifen?

Oder gibt es die Möglichkeit diese als Samba Freigabe ohne Endung, z.B.
dateiname.doc_01
zur Verfügung zu stellen
 
Danke für eine Antwort.

Mit freundlichen Grüßen

Stefan Martin


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



RE: History of history URI naming

2004-09-01 Thread Miguel Figueiredo

Hello Warwick,

 Actually, according to the deltaV spec and from what I've seen in my Slide
limited past experience, whenever we create a new resource, a new history
node must be created. It doesn't really matter if the resource shares the
same URI.

 That raises a problem witch is, how to garbage-collect the orphan nodes?
The spec does not mandate any action on these nodes, and Slide seems to it
likewise: seems like that client should take an option, on how to handle
them properly.

 Best regards,
 Miguel Figueiredo


Hi,
 
I haven't investigated this real deeply but I was wondering if there a
reason why the structure of the /history folder doesn't mirror the hierarchy
in the content space? eg. for a file /files/fileA the history folder would
be /history/files/fileA with the fileA versions under it. Is it because the
delta-v spec says that you can't delete the VHRs for a VCR even when the VCR
is deleted? And so if the VHRs are left around and you try to create a new
file with the same name and path after deleting it the first then the old
history would still be around and mess things up?
 
Thanks,
Warwick
 


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



RE: max revision limit?

2004-09-01 Thread Miguel Figueiredo

Hia,

 The problem should be with max revision limit! I for instance, managed to
handle a resource with over 20 revisions...

Best regards,
Miguel


_

This might be a know problem with the datastore and the max length of 
property values. This should be solved i the latest database schemas!

What version of slide and what store are you using?

/jacob

- Original Message - 
From:   [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 9:16 AM
Subject: max revision limit?


 hi, friends

 I met a weird problem. so far , I use client API to version control 
 file(checkin/checkout).
 the similar code is following:

 webdavResource.checkout()
 webdavResource.putmethod()
 webdavResource.checkin()

 I did it successfully in the first four times(version 1.0-1.4). But if I 
 want to put the fifth version file(1.5) to slide, the process failed. I 
 found that the putMehtod did upload the file, but checkout and checkin 
 method didnot work well.
 I print out the statusMessage of webdavResource and get the following 
 message:
 from checkout method:  Conflick(409)
 from checkin mehtod :WARN HttpMethodBase:2059 - Response content length 
 is not known Internal Server Error (500).

 did I do something wrong, or the slide just permit max 5 revision ?

 _
  MSN Explorer:   http://explorer.msn.com/lccn/

 -
 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: max revision limit?

2004-09-01 Thread Miguel Figueiredo


I'm sorry, meant SHOULD NOT, instead of SHOULD.
___

Hia,

 The problem should be with max revision limit! I for instance, managed to
handle a resource with over 20 revisions...

Best regards,
Miguel


_

This might be a know problem with the datastore and the max length of 
property values. This should be solved i the latest database schemas!

What version of slide and what store are you using?

/jacob

- Original Message - 
From:   [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 9:16 AM
Subject: max revision limit?


 hi, friends

 I met a weird problem. so far , I use client API to version control 
 file(checkin/checkout).
 the similar code is following:

 webdavResource.checkout()
 webdavResource.putmethod()
 webdavResource.checkin()

 I did it successfully in the first four times(version 1.0-1.4). But if I 
 want to put the fifth version file(1.5) to slide, the process failed. I 
 found that the putMehtod did upload the file, but checkout and checkin 
 method didnot work well.
 I print out the statusMessage of webdavResource and get the following 
 message:
 from checkout method:  Conflick(409)
 from checkin mehtod :WARN HttpMethodBase:2059 - Response content length 
 is not known Internal Server Error (500).

 did I do something wrong, or the slide just permit max 5 revision ?

 _
  MSN Explorer:   http://explorer.msn.com/lccn/

 -
 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]


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



Re: max revision limit?

2004-09-01 Thread Jacob Lund
Some revision information is stored in a property field! If the property 
length is set to 255 (or some other small length), then you will see 
truncation problemes after while!

This is why it varies with store and schema version!
/jacob
- Original Message - 
From: Miguel Figueiredo [EMAIL PROTECTED]
To: 'Slide Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 11:22 AM
Subject: RE: max revision limit?


I'm sorry, meant SHOULD NOT, instead of SHOULD.
___
Hia,
The problem should be with max revision limit! I for instance, managed to
handle a resource with over 20 revisions...
Best regards,
Miguel
_
This might be a know problem with the datastore and the max length of
property values. This should be solved i the latest database schemas!
What version of slide and what store are you using?
/jacob
- Original Message - 
From:   [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 9:16 AM
Subject: max revision limit?


hi, friends
I met a weird problem. so far , I use client API to version control
file(checkin/checkout).
the similar code is following:
webdavResource.checkout()
webdavResource.putmethod()
webdavResource.checkin()
I did it successfully in the first four times(version 1.0-1.4). But if I
want to put the fifth version file(1.5) to slide, the process failed. I
found that the putMehtod did upload the file, but checkout and checkin
method didnot work well.
I print out the statusMessage of webdavResource and get the following
message:
from checkout method:  Conflick(409)
from checkin mehtod :WARN HttpMethodBase:2059 - Response content length
is not known Internal Server Error (500).
did I do something wrong, or the slide just permit max 5 revision ?
_
 MSN Explorer:   http://explorer.msn.com/lccn/
-
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]
-
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]


AW: Versioning and checkout

2004-09-01 Thread Florey, Daniel
Hi Stefan,
please try to post in english as this mailinglist is also used as an archive to 
collect faq.
In case that this is not possible for you I'll give you a short answer in german...
 
Die Webfolder von Windows sind kein echtes Netzlaufwerk und so unter DOS nicht 
verfügbar. Ich kenne mich da auch nur rudimentär aus.
Du könntest es mit WebDrive versuchen, eine kommerzielle Software, die Slide als 
Netzlaufwerk anbindet. Keine Anhnung, ob das dann auch unter DOS-Shell zur Verfügung 
steht. Es gibt eine Trial-Version, damit kannst Du das ausprobieren.
Wenn Du etwas herausgefunden hast, bitte in die Liste posten, da das für andere auch 
interessant ist.
Der Link: www.webdrive.com
Gruß,
Daniel



Von: Martin, Stefan [mailto:[EMAIL PROTECTED]
Gesendet: Mi 01.09.2004 10:30
An: '[EMAIL PROTECTED]'
Betreff: Versioning and checkout



Hallo

habe ich die Möglichkeit, Domumente die im XML-Filestore in Slide vorhanden
sind,
auszuchecken? Ich möchte die Dokumente auf einen anderen Server Windows NT
als Laufwerk einbinden. Kann man auf die Webordner, als solcher habe ich
zwar
Zugriff, unter DOS irgendwie zugreifen?

Oder gibt es die Möglichkeit diese als Samba Freigabe ohne Endung, z.B.
dateiname.doc_01
zur Verfügung zu stellen

Danke für eine Antwort.

Mit freundlichen Grüßen

Stefan Martin


-
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: max revision limit?

2004-09-01 Thread kranga

If you are using Slide 2.0, the database schemas have fields of insufficient
length. Download and use the schemas from Slide 2.1. Or change or all the
varchar fields to text.


- Original Message - 
From: Jacob Lund [EMAIL PROTECTED]
To: Slide Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 3:32 AM
Subject: Re: max revision limit?


 This might be a know problem with the datastore and the max length of
 property values. This should be solved i the latest database schemas!

 What version of slide and what store are you using?

 /jacob

 - Original Message - 
 From:   [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, September 01, 2004 9:16 AM
 Subject: max revision limit?


  hi, friends
 
  I met a weird problem. so far , I use client API to version control
  file(checkin/checkout).
  the similar code is following:
 
  webdavResource.checkout()
  webdavResource.putmethod()
  webdavResource.checkin()
 
  I did it successfully in the first four times(version 1.0-1.4). But if I
  want to put the fifth version file(1.5) to slide, the process failed. I
  found that the putMehtod did upload the file, but checkout and checkin
  method didnot work well.
  I print out the statusMessage of webdavResource and get the following
  message:
  from checkout method:  Conflick(409)
  from checkin mehtod :WARN HttpMethodBase:2059 - Response content length
  is not known Internal Server Error (500).
 
  did I do something wrong, or the slide just permit max 5 revision ?
 
  _
   MSN Explorer:   http://explorer.msn.com/lccn/
 
  -
  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: NotificationTrigger event class?

2004-09-01 Thread Warwick Burrows
Hi James.

I was just looking for a way to simplify my Slide install by removing
features I don't need. But I do need cache update notifications so I'll keep
it.

Thanks,
Warwick
 

-Original Message-
From: James Mason [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 9:54 PM
To: Slide Users Mailing List
Subject: Re: NotificationTrigger event class?


All events require the NotificationTrigger, as far as I know. So yes, 
clustering requires it to be configured. The configuration is easy, but 
it changed for 2.1b1 so your old config will throw an error. It's only a 
two line difference in the config, though.

-James

Warwick Burrows wrote:
 Hi,
  
 What does the NotificationTrigger (event) class do,  and which other 
 Slide features require it to function?  Does the clustering support 
 and cache update notifications require this to be configured?
  
 Thanks,
 Warwick
  
  
 

-
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]



Confirmation for defect 30902?

2004-09-01 Thread Warwick Burrows
Hi,
 
I was wondering if someone would confirm a defect that I still see in the
2.1B1 release. This is related to defect number 30902 lock for space
separated paths not found that I've submitted a fix for. Using the CLI I've
created a collection called my stuff and uploaded a file to it called
testf.  I then locked the file with the options -o1 -sexclusive
-tinf and then check that the lock has worked with the locks command. It
did.  When I try to unlock the file with -o1 I get a 200 code back but
there is a message saying failed and the file is still locked. I'm running
on windows 2000 sp4.
 
The reason for this is that in LockMethod.parseResponse() the lock is being
added to the lock hashmap by WebdavState.addLock() with the escaped URI of
the file as the hash key. ie. the space is escaped with %20. The call that
returns this escaped URI to use with addLock() is
org.apache.commons.httpclient.HttpMethodBase.getPath() which (from the
javadoc for the corresponding setPath() method) returns a raw (escaped) path
-- or at least it expects it to be escaped if necessary by the caller. 
 
So when looking for the lock in WebdavResource.unlockMethod() we use the
unescaped URI to check for the existence of the lock in the hashmap when
calling WebdavState.getLock(). The lock was put in the hashmap with the
escaped URI as the key so its not found. The solution is to always use the
same hash key. Either the escaped or unescaped URI. In my fix I chose the
unescaped URI as that is most commonly used in the client and I'd only seen
this one case where addLock() was called with an escaped path.
 
Funny enough we do find the lock entry in WebdavState.discoverLock()  when
we process the locks that come back from the lockdiscovery property call in
WebdavResource.unlockMethod(). And we don't add a second lock entry for the
same token because in the second call to WebdavState.addLock() the addLock
code checks for the existence of this locktoken by checking for its value,
not by the hash key.
 
Warwick


unlocking locks owned by others

2004-09-01 Thread Warwick Burrows

Can any user unlock another user's locks? I didn't think that was valid.
What I'm seeing in 2.1B1 is that any user (the default for the CLI being
called Slide) can unlock a lock owned by another user. I worked my way
through the client piece of the puzzle and I see that it is setting the
locktoken in the header of the unlock request. But I don't see where its
setting the owner?  eg.

 to server ---
UNLOCK /slide/files/my%20stuff/outf HTTP/1.1
If: (opaquelocktoken:600107b7c611f08d4bf10af71e6d3a3f) 
User-Agent: Jakarta Commons-HttpClient/2.0rc3
Host: localhost:20080
Cookie: $Version=0; JSESSIONID=D1E5A4582544A30F431FFE72C628DEEB;
$Path=/slide
Content-Length: 0

Is it supposed to set the owner information in the request header so that
the server knows who is trying to do the unlock and can compare it to the
lock owner? I've still to look into the server side. I'm running my
configuration with security disabled but locks enabled in slide.properties.

Thanks,
Warwick
 


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



Re: Confirmation for defect 30902?

2004-09-01 Thread Carlos Villegas
Yes, I confirm this defect. In fact we fixed it locally the same way you 
did.  We were seen this problem quite often since we are testing 
japanese characters in paths.  We also wonder why the check in addLock() 
is based on the value, not the key. Is it because if binding is being 
used a given resource may have several URLs? But in that case, 
unlockMethod should also search locks by value to be consistent.

BTW, supporting japanese required adding lots of workarounds for MS 
Webfolders. Some versions of japanese WebFolders send paths encoded 
inconsistently in UTF8 or Shift_JIS, sometimes even unescaped. We 
basically had to auto-detect the encoding and escaping of the URLs sent 
by WebFolders.

Cheers,
Carlos
Warwick Burrows wrote:
Hi,
I was wondering if someone would confirm a defect that I still see in the
2.1B1 release. This is related to defect number 30902 lock for space
separated paths not found that I've submitted a fix for. Using the CLI I've
created a collection called my stuff and uploaded a file to it called
testf.  I then locked the file with the options -o1 -sexclusive
-tinf and then check that the lock has worked with the locks command. It
did.  When I try to unlock the file with -o1 I get a 200 code back but
there is a message saying failed and the file is still locked. I'm running
on windows 2000 sp4.
The reason for this is that in LockMethod.parseResponse() the lock is being
added to the lock hashmap by WebdavState.addLock() with the escaped URI of
the file as the hash key. ie. the space is escaped with %20. The call that
returns this escaped URI to use with addLock() is
org.apache.commons.httpclient.HttpMethodBase.getPath() which (from the
javadoc for the corresponding setPath() method) returns a raw (escaped) path
-- or at least it expects it to be escaped if necessary by the caller. 

So when looking for the lock in WebdavResource.unlockMethod() we use the
unescaped URI to check for the existence of the lock in the hashmap when
calling WebdavState.getLock(). The lock was put in the hashmap with the
escaped URI as the key so its not found. The solution is to always use the
same hash key. Either the escaped or unescaped URI. In my fix I chose the
unescaped URI as that is most commonly used in the client and I'd only seen
this one case where addLock() was called with an escaped path.
Funny enough we do find the lock entry in WebdavState.discoverLock()  when
we process the locks that come back from the lockdiscovery property call in
WebdavResource.unlockMethod(). And we don't add a second lock entry for the
same token because in the second call to WebdavState.addLock() the addLock
code checks for the existence of this locktoken by checking for its value,
not by the hash key.
Warwick
 


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


Re: unlocking locks owned by others

2004-09-01 Thread Carlos Villegas
Warwick Burrows wrote:
Can any user unlock another user's locks? I didn't think that was valid.
What I'm seeing in 2.1B1 is that any user (the default for the CLI being
called Slide) can unlock a lock owned by another user. I worked my way
through the client piece of the puzzle and I see that it is setting the
locktoken in the header of the unlock request. But I don't see where its
setting the owner?  eg.
 

...
Is it supposed to set the owner information in the request header so that
the server knows who is trying to do the unlock and can compare it to the
lock owner? I've still to look into the server side. I'm running my
configuration with security disabled but locks enabled in slide.properties.
 

Isn't it because security is disabled? There is a permission for 
unlocking other user's locks. If security is disabled, no checks are 
done, which means anybody can unlock any lock.
Also, my understanding is that the owner element in the lockMethod 
request is only informational. (The spec says it may contain phone 
number or home page of owner). A lock is identified only by the lock 
token and the principal owner of the token is determined by the current 
user (the user that was authenticated on login). Similarly, unlock uses 
the current session user as the principal requesting the unlock.

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


RE: Confirmation for defect 30902?

2004-09-01 Thread Warwick Burrows

Hi Carlos,

I've submitted a fix for the problem and hope to see it added to the HEAD
soon.

The only reason I can think of for addLock() searching by locktoken is that
with shared locks its possible for multiple locks with different lock tokens
to be set on the same uri. So when they're looking to see whether to add a
locktoken they get back from a propfind on the lock discovery property then
they have to key off the locktoken to be sure they don't add the same
locktoken twice -- since its perfect valid to have multiple locks on the
same uri. And when getting locks for various purposes the client uses the
owner that they're given (or Slide) by default to key off which of the set
of tokens that comes back from getLock() apply for the target owner and
target resource.

Warwick



-Original Message-
From: Carlos Villegas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 01, 2004 8:15 PM
To: Slide Users Mailing List
Subject: Re: Confirmation for defect 30902?


Yes, I confirm this defect. In fact we fixed it locally the same way you 
did.  We were seen this problem quite often since we are testing 
japanese characters in paths.  We also wonder why the check in addLock() 
is based on the value, not the key. Is it because if binding is being 
used a given resource may have several URLs? But in that case, 
unlockMethod should also search locks by value to be consistent.

BTW, supporting japanese required adding lots of workarounds for MS 
Webfolders. Some versions of japanese WebFolders send paths encoded 
inconsistently in UTF8 or Shift_JIS, sometimes even unescaped. We 
basically had to auto-detect the encoding and escaping of the URLs sent 
by WebFolders.

Cheers,

Carlos

Warwick Burrows wrote:

Hi,
 
I was wondering if someone would confirm a defect that I still see in 
the 2.1B1 release. This is related to defect number 30902 lock for 
space separated paths not found that I've submitted a fix for. Using 
the CLI I've created a collection called my stuff and uploaded a file 
to it called testf.  I then locked the file with the options -o1 
-sexclusive -tinf and then check that the lock has worked with the 
locks command. It did.  When I try to unlock the file with -o1 
I get a 200 code back but there is a message saying failed and the 
file is still locked. I'm running on windows 2000 sp4.
 
The reason for this is that in LockMethod.parseResponse() the lock is 
being added to the lock hashmap by WebdavState.addLock() with the 
escaped URI of the file as the hash key. ie. the space is escaped with 
%20. The call that returns this escaped URI to use with addLock() is
org.apache.commons.httpclient.HttpMethodBase.getPath() which (from the 
javadoc for the corresponding setPath() method) returns a raw (escaped) 
path
-- or at least it expects it to be escaped if necessary by the caller. 
 
So when looking for the lock in WebdavResource.unlockMethod() we use 
the unescaped URI to check for the existence of the lock in the hashmap 
when calling WebdavState.getLock(). The lock was put in the hashmap 
with the escaped URI as the key so its not found. The solution is to 
always use the same hash key. Either the escaped or unescaped URI. In 
my fix I chose the unescaped URI as that is most commonly used in the 
client and I'd only seen this one case where addLock() was called with 
an escaped path.
 
Funny enough we do find the lock entry in WebdavState.discoverLock()  
when we process the locks that come back from the lockdiscovery 
property call in WebdavResource.unlockMethod(). And we don't add a 
second lock entry for the same token because in the second call to 
WebdavState.addLock() the addLock code checks for the existence of this 
locktoken by checking for its value, not by the hash key.
 
Warwick

  



-
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: unlocking locks owned by others

2004-09-01 Thread Warwick Burrows

Ok, that sounds like a good place to start. I'll investigate tomorrow to see
whether my turning security off caused the change in behaviour. Thanks.

And although the spec may say the lock owner is informational Slide's
behaviour was to enforce locks and I hope that it will do the same again
once I enable security (or work around it). Weird thing is that during one
run of the slide server locks were getting enforced. The next time I started
the server after submitting some changes I had just added to my tree they
weren't :-)  It certainly seems to be config related.

Thanks,
Warwick



-Original Message-
From: Carlos Villegas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 01, 2004 8:49 PM
To: Slide Users Mailing List
Subject: Re: unlocking locks owned by others


Warwick Burrows wrote:

Can any user unlock another user's locks? I didn't think that was 
valid. What I'm seeing in 2.1B1 is that any user (the default for the 
CLI being called Slide) can unlock a lock owned by another user. I 
worked my way through the client piece of the puzzle and I see that it 
is setting the locktoken in the header of the unlock request. But I 
don't see where its setting the owner?  eg.

  

...

Is it supposed to set the owner information in the request header so 
that the server knows who is trying to do the unlock and can compare it 
to the lock owner? I've still to look into the server side. I'm running 
my configuration with security disabled but locks enabled in 
slide.properties.

  

Isn't it because security is disabled? There is a permission for 
unlocking other user's locks. If security is disabled, no checks are 
done, which means anybody can unlock any lock.
Also, my understanding is that the owner element in the lockMethod 
request is only informational. (The spec says it may contain phone 
number or home page of owner). A lock is identified only by the lock 
token and the principal owner of the token is determined by the current 
user (the user that was authenticated on login). Similarly, unlock uses 
the current session user as the principal requesting the unlock.

Carlos


-
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: Can WebDAV servlet serve non-slide-managed filesystem?

2004-09-01 Thread James Mason
'twould be nice were this easier (or at least better documented). It 
looks like you're on the right track, though.

I think you'll need to set the DAV:resourcetype property at a minimum.
Relevant line from JNDIPrincipalStore:
props.put(
DAV:resourcetype,
new NodeProperty(resourcetype, resourceType, DAV:, , false));
I'm not positive, but I think the key for the hashtable (props) is 
significant.

Other than that there are a few properties you'll probably want to 
return for files (size, modification date, etc).

-James
alon salant wrote:
Deploying an additional scope seems to work fine.
It looks like I need to implement both RevisionDescriptorStore and
RevisionDescriptorsStore. Deploying with the Transient versions
deployed fine, but when trying to browse with the XP webdav client, I
got RevisionNotFoundExceptions for the uri of the resource.
So I tried just implementing
RevisionDescriptorsStore.retrieveRevisionDescriptors( ) as it is in
the JNDIPrincipalStore, but then I got Exceptions from
TransientDescriptorStore which seems to depend on the existence of
TransientDescriptorsStore (not sure about that one).
So I stubbed out both RevisionDescriptorStore and
RevisionDescriptorsStore. It looks like I need to implement
RevisionDescriptorStore.retrieveRevisionDescriptor( ). I implemented a
simple version that returns a new NodeRevisionDescriptor with its date
properties set. My /files node shows up as a 0 byte file in my webdav
browser, not a folder.
I am not sure about how to propertly create a NodeRevisionDescriptor -
which properties should be set folders, and which for files. Any
hints?
Am I off track here?
Alon
On Tue, 31 Aug 2004 09:10:36 -0700, James Mason [EMAIL PROTECTED] wrote:
alon,
Sorry I didn't think of this earlier. It will probably be easier, at
least initialy, to have two store configured in your domain. Leave the
default store in place with a scope of /, and add your store with a
scope of /files. This way you won't have to mess with the data
section of the domain, and you won't have to worry about returning
ActionNodes.
Once you have your store working you can decide how you want to handle
the other information. It will probably be simplest to setup some basic
permissions in your domain then map the webdav servlet to only server
the /files node, but other options are available.
-James

alon salant wrote:
Okay, I've partially answered one of my questions.
Playing around and reading the config more carefully, I replaced the
sample data element configuration with
data
 objectnode classname=org.apache.slide.structure.SubjectNode uri=/
   permission action=all subject=all inheritable=true/
 /objectnode
/data
and can now directory browse through the webdav servlet. All I see is
an empty root directory which is what I expect based on my initial
SimpleFileStore implementation.
Mapping a web folder from win xp is claiming that the folder you
entered does not appear to be valid but I have not looked in to this
yet.
I am curious to know what of of the namespace configuration element is
required for what I am trying to do.
Alon
On Tue, 31 Aug 2004 00:06:29 -0700, alon salant [EMAIL PROTECTED] wrote:

I've decided to take an initial step of stubbing out my
SimpleFileStore implementation and deploying it in my webapp.
I started with the Domain.sample file from the 2.1b1 distribution and
modified the namespace definition as follows:
definition
store name=files
  nodestore classname=photospace.slide.SimpleFileStore
parameter name=rootpathstore/metadata/parameter
  /nodestore
  contentstore classname=photospace.slide.SimpleFileStore
parameter name=rootpathstore/content/parameter
  /contentstore
  securitystore
classname=org.apache.slide.store.mem.TransientSecurityStore/
  lockstore classname=org.apache.slide.store.mem.TransientLockStore/
  revisiondescriptorsstore
classname=org.apache.slide.store.mem.TransientDescriptorsStore/
  revisiondescriptorstore
classname=org.apache.slide.store.mem.TransientDescriptorStore/
/store
scope match=/ store=files/
/definition
SimpleFileStore implements NodeStore and ContentStore. This
configuration deploys without error.

Is SubjectNode an
appropriate ObjectNode implementation to return from retrieveObject(
)?
Yes.
I did find that retrieveObject( ) needs to return an ActionNode not
SubjectNode for NamespaceConfig.getActionNode( ) which was being
called in slide startup. I was getting a ClassCastException. So should
I always return an ActionNode from retrieveObject( )? What's the
difference from a SubjectNode?
I have the slide WebDAV servlet configured and starting up without
errors and with directory browsing turned on. However, when I browse
to the servlet url, I get a 403 and a single log line from slide:
http-8080-Processor25, 30-Aug-2004 23:43:47, unauthenticated, GET,
403 Forbidden, 47 ms, /
Note that I have not removed the sample namespace configuration or
data from the Domain.sample file that I started with. Reading this
file, I'm not sure what is