jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Pietsch <mpe...@gmx.de>
Subject Files uploaded by WebDAV not accessible via OCM queries
Date Sun, 14 Dec 2008 17:21:34 GMT

my problem is close to "Plain JCR XPATH queries" by Edgar Merino 
(http://article.gmane.org/gmane.comp.apache.jackrabbit.user/9748) but 
not the same:

I read and followed the instructions from 
http://jackrabbit.apache.org/5-with-jackrabbit-ocm.html (and related) to 
set up OCM for Jackrabbit and i'm using the POJOs from the JUnit tests 
to  set up the mapping for Files and Folders. After solving that issue 
with the ocm_classname discussed in


everything is working except one thing:

Files that are uploaded via WebDAV do not contain that ocm_classname 
discriminator, which means that these files cannot not be found by 
queries like:

Filter filter = queryManager.createFilter(File.class);
Query query = qm.createQuery(filter);

which is desirable. Using a basic search query like:


results in an exception:

org.apache.jackrabbit.ocm.exception.ObjectContentManagerException: Class 
'org.mycompany.model.jcr.File' has not a discriminator property.

The question: Is there a chance ...

1) to tell the WebDAV-Servlet to set the discriminator properties for 
uploaded Files and Folders or

2) that OCM recognized nodes as files or folders even without that 
discriminator property?

Any suggestions?

View raw message