Seems I found the issue; Jackrabbit persists the properties just fine; it was just the export handler (DirListingExportHandler) that has a hardcoded list of properties to be exported. This list is identical to the properties you get on nt:folder in the original configuration. So if you change the node-config you also need a new property handler. The issue with the "clean" collection apparently had to do with caching and was just a distraction.
Got a hack now that works and will write a new handler class that is suitable for Webdav users and send it to this mailing list. Where is a good place to document things like this? There might be more people out there who fall into that trap. Well at least I hope I'm not the only one. Would make me feel a bit stupid. Cheers roland > -----Original Message----- > From: Roland Porath [mailto:[EMAIL PROTECTED] > Sent: Thursday, 7 February 2008 11:23 AM > To: [email protected] > Subject: RE: properties in collections > > Hi Angela > > I apologise for being unclear in my original post. > > I did start from the webdav layer. Only when the behavior of that did not > make sense to me I started to dig into the code of the server. > I do appreciate that the server is at a much lower level than webdav but > currently I believe this is where the problem originates. > > Just a brief recapitulation of the webdav behavior: > > All test were run with an unmodified config.xml > > Case 1 unpatched builtin-nodetypes.xml > 1.1. non collection > - proppatch returns a 207 containing a 200 > - propget returns the newly created property and it's value > 1.2 collection > - proppatch returns a 207 containing a 409 > Both 1.1 and 1.2 are exactly what you would expect. > Case 2 patched builtin-nodetypes; > 2.1 non collection: > - same behavior as 1.1 > 2.1 collection: > - proppatch return 207 containing a 200 > - propget does not return the newly created property but > lastModified has been updated. > > > That's where I was at when I decided I had to dig into the code and found > that collections don't get dirty when a property is added. > I guess what I'm trying to find out is if this is a feature or a bug. > I need to fix this because we make heavy use of collections on properties. > From your response I get the impression that you suspect it to be a bug > and > unless some new evidence comes in, I'll second that. > Should it be bugged in JIRA? I'm happy to pick it up because I need to fix > it asap anyway. > The problem seems to live in the area of ItemImpl.save() and the whole > persistence mechanism around it. > > Cheers > > Roland > > APPENDIX for the terminally geeky: protocol of my tests > > ************************************************************************** > ** > ******** > UNPATCHED BUILTIN-NODETYPES > ************************************************************************** > ** > ******** > <nodeType name="nt:hierarchyNode" isMixin="false" > hasOrderableChildNodes="false" primaryItemName=""> > <supertypes> > <supertype>nt:base</supertype> > </supertypes> > <propertyDefinition name="jcr:created" requiredType="Date" > autoCreated="true" mandatory="false" onParentVersion="INITIALIZE" > protected="true" multiple="false"/> > </nodeType> > > *************************NON > COLLECTION******************************************** > cadaver: propset t1 testProp testvalue > > PROPPATCH /jackrabbit-webapp-1.4/repository/default/test/t1 HTTP/1.1 > Host: 127.0.0.1:5000 > User-Agent: cadaver/0.22.2 neon/0.24.6 > Connection: TE > TE: trailers > Content-Length: 208 > Content-Type: application/xml > Authorization: Basic QWRtaW5pc3RyYXRvcjpmcmVlLmRvbQ== > > <?xml version="1.0" encoding="utf-8" ?> > <D:propertyupdate xmlns:D="DAV:"> > <D:set> > <D:prop> > <testProp > xmlns="http://webdav.org/cadaver/custom-properties/">value</testProp> > </D:prop> > </D:set> > </D:propertyupdate> > > > HTTP/1.1 207 Multi-Status > Content-Type: text/xml;charset=UTF-8 > Content-Length: 339 > Date: Wed, 06 Feb 2008 22:57:13 GMT > Server: Apache-Coyote/1.1 > > <?xml version="1.0" encoding="UTF-8"?> > <D:multistatus xmlns:D="DAV:"> > <D:response> > > <D:href>http://127.0.0.1:5000/jackrabbit-webapp- > 1.4/repository/default/test/ > t1</D:href> > <D:propstat> > <D:prop> > <testProp > xmlns="http://webdav.org/cadaver/custom-properties/"/> > </D:prop> > <D:status>HTTP/1.1 200 OK</D:status> > </D:propstat> > </D:response> > </D:multistatus> > > *************************COLLECTION*************************************** > ** > *** > cadaver: propset c1 testProp testvalue > > PROPPATCH /jackrabbit-webapp-1.4/repository/default/test/c1 HTTP/1.1 > Host: 127.0.0.1:5000 > User-Agent: cadaver/0.22.2 neon/0.24.6 > Connection: TE > TE: trailers > Content-Length: 208 > Content-Type: application/xml > Authorization: Basic QWRtaW5pc3RyYXRvcjpmcmVlLmRvbQ== > > <?xml version="1.0" encoding="utf-8" ?> > <D:propertyupdate xmlns:D="DAV:"> > <D:set> > <D:prop> > <testprop > xmlns="http://webdav.org/cadaver/custom-properties/">value</testprop> > </D:prop> > </D:set> > </D:propertyupdate> > > HTTP/1.1 207 Multi-Status > Content-Type: text/xml;charset=UTF-8 > Content-Length: 346 > Date: Wed, 06 Feb 2008 23:01:21 GMT > Server: Apache-Coyote/1.1 > > <?xml version="1.0" encoding="UTF-8"?> > <D:multistatus xmlns:D="DAV:"> > <D:response> > > <D:href>http://127.0.0.1:5000/jackrabbit-webapp- > 1.4/repository/default/test/ > c1/</D:href> > <D:propstat> > <D:prop> > <testprop > xmlns="http://webdav.org/cadaver/custom-properties/"/> > </D:prop> > <D:status>HTTP/1.1 409 Conflict</D:status> > </D:propstat> > </D:response> > </D:multistatus> > > > > > > > > ************************************************************************** > ** > ******** > PATCHED BUILTIN-NODETYPES > ************************************************************************** > ** > ******** > <nodeType name="nt:hierarchyNode" isMixin="false" > hasOrderableChildNodes="false" primaryItemName=""> > <supertypes> > <supertype>nt:base</supertype> > </supertypes> > <propertyDefinition name="jcr:created" requiredType="Date" > autoCreated="true" mandatory="false" onParentVersion="INITIALIZE" > protected="true" multiple="false"/> > <propertyDefinition name="*" requiredType="undefined" > autoCreated="false" mandatory="false" onParentVersion="COPY" > protected="false" multiple="true"/> > <propertyDefinition name="*" requiredType="undefined" > autoCreated="false" mandatory="false" onParentVersion="COPY" > protected="false" multiple="false"/> > </nodeType> > //tried the same patch in nt:folder; less evil hack i reckon, > unfortunately > same behavior. > *************************NON > COLLECTION******************************************** > > > PROPPATCH /jackrabbit-webapp-1.4/repository/default/test/t1 HTTP/1.1 > Host: 127.0.0.1:5000 > User-Agent: cadaver/0.22.2 neon/0.24.6 > Connection: TE > TE: trailers > Content-Length: 208 > Content-Type: application/xml > Authorization: Basic QWRtaW5pc3RyYXRvcjpmcmVlLmRvbQ== > > <?xml version="1.0" encoding="utf-8" ?> > <D:propertyupdate xmlns:D="DAV:"> > <D:set> > <D:prop> > <testProp > xmlns="http://webdav.org/cadaver/custom-properties/">value</testProp> > </D:prop> > </D:set> > </D:propertyupdate> > > HTTP/1.1 207 Multi-Status > Content-Type: text/xml;charset=UTF-8 > Content-Length: 339 > Date: Wed, 06 Feb 2008 23:31:28 GMT > Server: Apache-Coyote/1.1 > > <?xml version="1.0" encoding="UTF-8"?> > <D:multistatus xmlns:D="DAV:"> > <D:response> > > <D:href>http://127.0.0.1:5000/jackrabbit-webapp- > 1.4/repository/default/test/ > t1</D:href> > <D:propstat> > <D:prop> > <testProp > xmlns="http://webdav.org/cadaver/custom-properties/"/> > </D:prop> > <D:status>HTTP/1.1 200 OK</D:status> > </D:propstat> > </D:response> > </D:multistatus > > > *************************COLLECTION*************************************** > ** > *** > > > PROPPATCH /jackrabbit-webapp-1.4/repository/default/test/c1 HTTP/1.1 > Host: 127.0.0.1:5000 > User-Agent: cadaver/0.22.2 neon/0.24.6 > Connection: TE > TE: trailers > Content-Length: 208 > Content-Type: application/xml > Authorization: Basic QWRtaW5pc3RyYXRvcjpmcmVlLmRvbQ== > > <?xml version="1.0" encoding="utf-8" ?> > <D:propertyupdate xmlns:D="DAV:"> > <D:set> > <D:prop> > <testProp > xmlns="http://webdav.org/cadaver/custom-properties/">value</testProp> > </D:prop> > </D:set> > </D:propertyupdate> > > > HTTP/1.1 207 Multi-Status > Content-Type: text/xml;charset=UTF-8 > Content-Length: 340 > Date: Wed, 06 Feb 2008 23:28:08 GMT > Server: Apache-Coyote/1.1 > > <?xml version="1.0" encoding="UTF-8"?> > <D:multistatus xmlns:D="DAV:"> > <D:response> > > <D:href>http://127.0.0.1:5000/jackrabbit-webapp- > 1.4/repository/default/test/ > c1/</D:href> > <D:propstat> > <D:prop> > <testProp > xmlns="http://webdav.org/cadaver/custom-properties/"/> > </D:prop> > <D:status>HTTP/1.1 200 OK</D:status> > </D:propstat> > </D:response> > </D:multistatus> > > > > > > > !DSPAM:47aa4fd1151481528652890!
