jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Pietsch <mpe...@gmx.de>
Subject Uploaded WebDAV files will (still) not be mapped by OCM
Date Fri, 09 Jan 2009 02:27:55 GMT

this posting refers to my posting on 2008-12-14 "Files uploaded by 
WebDAV not accessible via OCM queries".

I have an annotation based mapping for nt:file and nt:folder (and thus 
nt:resource). See


My nt:file mapping

@Node(jcrType="nt:file", jcrMixinTypes = "mix:lockable", 
extend=HierarchyNode.class, discriminator = false)
public class File extends HierarchyNode

     @Bean(jcrName="jcr:content") private Resource resource;

     // getters and setters follow


Somehow the Mapper is not able to map a file uploaded with WebDAV to the 
  appropriate File class above. The mapper complains about the missing 
discrimator -- a property that is not being set by the WebDAV servlet.

Class 'org.mycompany.model.jcr.File' has not a discriminator property.

An uploaded files looks like:

<sv:node sv:name="DCP06394.jpg">
     <sv:property sv:name="jcr:primaryType" sv:type="Name">
     <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
     <sv:property sv:name="jcr:created" sv:type="Date">
     <sv:node sv:name="jcr:content">
         <sv:property sv:name="jcr:primaryType" sv:type="Name">
         <sv:property sv:name="jcr:data" sv:type="Binary">
                 /9j/4AAQSkZJRg[... additional data]
         <sv:property sv:name="jcr:lastModified" sv:type="Date">
         <sv:property sv:name="jcr:mimeType" sv:type="String">

By contrast a file created programmatically always contains the 
discriminator property "ocm_classname" even though my definition says 
"discriminator = false". What's wrong here?

Actually the mapper should able to do the mapping just on the basis of 
the jcrType (as St├ęphane Landelle suggested in my previous thread) 
regardless of the discriminator.

Can anyone provide me with a configuration example that is independent 
from the discriminator.

I hope my concern is clear...

Thanks in advance,

View raw message